Replace elif list() > int() with else
authorDiane Trout <diane@ghic.org>
Mon, 2 Feb 2015 22:40:47 +0000 (14:40 -0800)
committerDiane Trout <diane@ghic.org>
Mon, 2 Feb 2015 22:40:47 +0000 (14:40 -0800)
the expression was always true under python2 and
is a syntax error in python3. Replacing it with
if len(list()) > 0 caused test case failures
so this seemed like the best idea.

htsworkflow/pipelines/ipar.py

index 8719a060cd9d1ef67a2abf0cc33e7055d4924e53..4b0c57e4fa817c9f64cc57dfd681bbc3180a3bfe 100644 (file)
@@ -230,13 +230,12 @@ def ipar(pathname):
     if not (groups[0] == 'IPAR' or groups[0] == 'Intensities'):
       raise ValueError('ipar can only process IPAR directories')
 
-    bustard_pattern = os.path.join(pathname, 'Bustard*')
     # contents of the matrix file?
     matrix_pathname = os.path.join(pathname, 'Matrix', 's_matrix.txt')
     if os.path.exists(matrix_pathname):
         # this is IPAR_1.01
         i.matrix = open(matrix_pathname, 'r').read()
-    elif glob(bustard_pattern) > 0:
+    else:
         i.matrix = None
         # its still live.