Actually comare an integer (length of list) to an integer 0.
[htsworkflow.git] / htsworkflow / pipelines / firecrest.py
index 3519eb0123600ef99602cccb25210d119a62a073..fba83f9d97c782b349f5021d6bbbe0919e65b5e4 100644 (file)
@@ -9,6 +9,7 @@ fromxml
   Firecrest factory function initalized from an xml dump from
   the Firecrest object.
 """
+from __future__ import print_function
 
 from datetime import date
 from glob import glob
@@ -66,11 +67,11 @@ class Firecrest(object):
     def dump(self):
         """Report debugginf information
         """
-        print "Starting cycle:", self.start
-        print "Ending cycle:", self.stop
-        print "Firecrest version:", self.version
-        print "Run date:", self.date
-        print "user:", self.user
+        print("Starting cycle:", self.start)
+        print("Ending cycle:", self.stop)
+        print("Firecrest version:", self.version)
+        print("Run date:", self.date)
+        print("user:", self.user)
 
     def get_elements(self):
         """Return XML serialization structure.
@@ -144,7 +145,7 @@ def firecrest(pathname):
     if os.path.exists(matrix_pathname):
         # this is for firecrest < 1.3.2
         f.matrix = open(matrix_pathname, 'r').read()
-    elif glob(bustard_pattern) > 0:
+    elif len(glob(bustard_pattern)) > 0:
         f.matrix = None
         # there are runs here. Bustard should save the matrix.
     else: