]> arthur.barton.de Git - bup.git/blobdiff - main.py
tclient: invoke bup via absolute path
[bup.git] / main.py
diff --git a/main.py b/main.py
index dc1bec28690015fceaf127ec27af29ce56767748..154c5dc393b8d7493d037e77aec2c29f69a55bdd 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -5,12 +5,12 @@ exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
 
+from __future__ import absolute_import
 import errno, re, sys, os, subprocess, signal, getopt
 
-from fcntl import F_GETFL, F_SETFL
 from subprocess import PIPE
 from sys import stderr, stdout
-import fcntl, select
+import select
 
 argv = sys.argv
 exe = os.path.realpath(argv[0])
@@ -35,7 +35,7 @@ os.environ['BUP_MAIN_EXE'] = os.path.abspath(exe)
 os.environ['BUP_RESOURCE_PATH'] = resourcepath
 
 
-from bup import helpers
+from bup import compat, helpers
 from bup.compat import add_ex_tb, chain_ex, wrap_main
 from bup.helpers import atoi, columnate, debug1, log, tty_width
 
@@ -186,9 +186,6 @@ def filter_output(src_out, src_err, dest_out, dest_err):
     pending_ex = None
     try:
         fds = tuple([x for x in (src_out, src_err) if x is not None])
-        for fd in fds:
-            flags = fcntl.fcntl(fd, F_GETFL)
-            assert fcntl.fcntl(fd, F_SETFL, flags | os.O_NONBLOCK) == 0
         while fds:
             ready_fds, _, _ = select.select(fds, [], [])
             width = tty_width()