]> code.communitydata.science - cdsc_reddit.git/blobdiff - helper.py
Bugfix
[cdsc_reddit.git] / helper.py
index 4dc6210bef50e8142f2c56fbc788700cc761a082..b401cada8a3ec394c5c0f6985f7954d2d39af1b7 100644 (file)
--- a/helper.py
+++ b/helper.py
@@ -17,16 +17,8 @@ def find_dumps(dumpdir, base_pattern):
     ext_priority = ['.zst','.xz','.bz2']
 
     for base, exts in dumpext.items():
-        found = False
-        if len(exts) == 1:
-            yield base + exts[0]
-            found = True
-        else:
-            for ext in ext_priority:
-                if ext in exts:
-                    yield base + ext
-                    found = True
-        assert(found == True)
+        ext = [ext for ext in ext_priority if ext in exts][0]
+        yield base + ext
 
 def open_fileset(files):
     for fh in files:

Community Data Science Collective || Want to submit a patch?