Johannes Köster  committed 6b5cbc9

Better handling of BrokenPipeError.

  • Participants
  • Parent commits 1d32c66

Comments (0)

Files changed (2)

File snakemake/

+    except BrokenPipeError:
+        # ignore this exception and stop. It occurs if snakemake output is piped into less and less quits before reading the whole output.
+        # in such a case, snakemake shall stop scheduling and quit with error 1
+        success = False
     except (Exception, BaseException) as ex:
         print_exception(ex, workflow.linemaps)
         success = False

File snakemake/

       , 'terminator', '\n'))
-            except (KeyboardInterrupt, SystemExit, BrokenPipeError):
+            except BrokenPipeError as e:
+                raise e
+            except (KeyboardInterrupt, SystemExit):
                 # ignore any exceptions in these cases as any relevant messages have been printed before
             except Exception as e: