]> arthur.barton.de Git - bup.git/commitdiff
cmd/fsck-cmd.py: Do not warn about empty par2 output
authorChristian Cornelssen <ccorn@1tein.de>
Tue, 18 Feb 2020 14:43:51 +0000 (15:43 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 1 Mar 2020 22:54:55 +0000 (16:54 -0600)
With a recent `par2` installed, `bup fsck -v` outputs messages like

  Unexpected par2 error output
  ''Assuming par2 supports parallel processing

when there was no error output and the exit status was zero.  Stop
printing the warning in that case.

Signed-off-by: Christian Cornelssen <ccorn@1tein.de>
[rlb@defaultvalue.org: add information from the pr to commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/fsck-cmd.py

index b97a1d7dab63763efc1f92c20388c4d886f07e01..a241ac5b4eb86c8b0efaa8441c8b74b7d43c2cfe 100755 (executable)
@@ -61,7 +61,7 @@ def is_par2_parallel():
         _, err = p.communicate()
         parallel = p.returncode == 0
         if opt.verbose:
         _, err = p.communicate()
         parallel = p.returncode == 0
         if opt.verbose:
-            if err != b'Invalid option specified: -t1\n':
+            if len(err) > 0 and err != b'Invalid option specified: -t1\n':
                 log('Unexpected par2 error output\n')
                 log(repr(err))
             if parallel:
                 log('Unexpected par2 error output\n')
                 log(repr(err))
             if parallel: