We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if bup is called somewhat with a weird stdout, for example if redirected to /dev/null (iirc), it will crash with:
/dev/null
19:31 <anarcat> sys.stdout.flush() 19:31 <anarcat> IOError: [Errno 9] Bad file descriptor 19:31 <anarcat> File "/usr/lib/bup/cmd/bup-index", line 89, in update_index
this is of course related to #2.
here's a workaround:
diff --git a/cmd/index-cmd.py b/cmd/index-cmd.py index b7fe8f1..3eedb31 100755 --- a/cmd/index-cmd.py +++ b/cmd/index-cmd.py @@ -87,7 +87,11 @@ def hashgen(name): exclude_rxs=exclude_rxs): if opt.verbose>=2 or (opt.verbose==1 and stat.S_ISDIR(pst.st_mode)): sys.stdout.write('%s\n' % path) - sys.stdout.flush() + try: + sys.stdout.flush() + except IOError: + # probably stdout is closed, ignore + pass elapsed = time.time() - index_start paths_per_sec = total / elapsed if elapsed else 0 qprogress('Indexing: %d (%d paths/s)\r' % (total, paths_per_sec))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
if bup is called somewhat with a weird stdout, for example if redirected to
/dev/null
(iirc), it will crash with:this is of course related to #2.
here's a workaround:
The text was updated successfully, but these errors were encountered: