gremlin/gremlin.in: Refactor content-type guessing.
[autoys] / gremlin / gremlin.in
index 7b0e47d..0a76641 100644 (file)
@@ -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)