Commits

Johannes Köster committed 66b8419

Check for lock before reporting incomplete files in order to avoid misleading error messages.

Comments (0)

Files changed (2)

             raise RuleException(include=chain(*exceptions.values()))
         self.update_needrun()
 
+
+
+        for job in filter(
+            lambda job: (job.dynamic_output
+                and not self.needrun(job)), self.jobs):
+            self.update_dynamic(job)
+        self.postprocess()
+
+    def check_incomplete(self):
         if not self.ignore_incomplete:
             incomplete = self.incomplete_files
             if incomplete:
                 else:
                     raise IncompleteFilesException(incomplete)
 
-        for job in filter(
-            lambda job: (job.dynamic_output
-                and not self.needrun(job)), self.jobs):
-            self.update_dynamic(job)
-        self.postprocess()
-
     @property
     def jobs(self):
         """ All jobs in the DAG. """

snakemake/workflow.py

 
         self.persistence = Persistence(nolock=nolock, dag=dag)
 
-        try:
-            dag.init()
-        except RuleException as ex:
-            # TODO think about printing a DAG on request here
-            print_exception(ex, self.linemaps)
-            return False
-        except (Exception, BaseException) as ex:
-            print_exception(ex, self.linemaps)
-            return False
+        dag.init()
 
         if unlock:
             try:
                 "the --unlock argument.".format(os.getcwd()))
             return False
 
+        dag.check_incomplete()
+
         if printdag:
             print(dag)
             return True