From: Mark Wooding Date: Tue, 17 Apr 2018 21:33:54 +0000 (+0100) Subject: gremlin/gremlin.in: Refactor content-type guessing. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/autoys/commitdiff_plain/2a236d3a90eb57b444f90c2881aa42ae06c5e0c3 gremlin/gremlin.in: Refactor content-type guessing. Remove the `gf' temporary, which isn't really doing much of any good. --- diff --git a/gremlin/gremlin.in b/gremlin/gremlin.in index 7b0e47d..0a76641 100644 --- a/gremlin/gremlin.in +++ b/gremlin/gremlin.in @@ -1513,8 +1513,9 @@ def grobble(master, targets, noact = False): ## the appropriate categories. Later, we'll apply policy to the ## files, by category, and work out what to do with them all. else: - gf = GIO.File(masterfile) - mime = gf.query_info('standard::content-type').get_content_type() + mime = GIO.File(masterfile) \ + .query_info('standard::content-type') \ + .get_content_type() cats = [] for cat in pmap.iterkeys(): id = cat.identify(masterfile, mime)