django-nose didn't work with django 1.1, so I went back to the nose plugin NoseDjango
[htsworkflow.git] / htsworkflow / frontend / samples / results.py
index c2419cd916d110463297f97d4bf6a5b7449d78dc..3c6543a31bce847e7ab6d4ec72d8ff153e44c836 100644 (file)
@@ -1,4 +1,4 @@
-from htsworkflow.frontend import settings
+from django.conf import settings
 
 import glob
 import os
@@ -95,7 +95,11 @@ def get_flowcell_result_dict(flowcell_id):
             
         ###############################
         # scores.tar.gz
-        scores_filepath = glob.glob(os.path.join(c_dir_path, 'scores*'))
+        # restrict to only compressed files, so in case there are *.md5 files
+        # we don't get confused.
+        scores_filepath = []
+        for pattern in ['scores*.tar.bz2', 'scores*.tar.gz', 'scores*.tgz']:
+            scores_filepath += glob.glob(os.path.join(c_dir_path, pattern))
         
         if len(scores_filepath) == 0:
             d[c_dir]['scores'] = None