Convert old style except blocks to except Exception as variable: blocks
[htsworkflow.git] / htsworkflow / submission / daf.py
index f04ac8fe5328e738a012738a5d256b9307e11504..30edcdc54ba3ca60fc231334c5de2b3a38909568 100644 (file)
@@ -300,7 +300,7 @@ class UCSCSubmission(object):
             LOGGER.info("Importing %s from %s" % (lib_id, result_dir))
             try:
                 self.import_submission_dir(result_dir, lib_id)
-            except MetadataLookupException, e:
+            except MetadataLookupException as e:
                 LOGGER.error("Skipping %s: %s" % (lib_id, str(e)))
 
     def import_submission_dir(self, submission_dir, library_id):
@@ -531,7 +531,7 @@ class UCSCSubmission(object):
             LOGGER.debug("Found: %s" % (literal_re,))
             try:
                 filename_re = re.compile(literal_re)
-            except re.error, e:
+            except re.error as e:
                 LOGGER.error("Unable to compile: %s" % (literal_re,))
             patterns[literal_re] = view_name
         return patterns