]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/ssh.py
PackWriter._end: always try to release objcache and parentfd
[bup.git] / lib / bup / ssh.py
index 7f178a69dc2ca0101563e283878b0d3e326ceec3..b6352293b54a642d47ce11e1d13c24cb889f9b54 100644 (file)
@@ -5,7 +5,7 @@ Connect to a remote host via SSH and execute a command on the host.
 from __future__ import absolute_import, print_function
 import sys, os, re, subprocess
 
-from bup import helpers, path
+from bup import path
 from bup.compat import environ
 
 def connect(rhost, port, subcmd, stderr=None):
@@ -14,11 +14,11 @@ def connect(rhost, port, subcmd, stderr=None):
     if rhost is None or rhost == b'-':
         argv = [path.exe(), subcmd]
     else:
-        buglvl = helpers.atoi(environ.get(b'BUP_DEBUG'))
-        force_tty = helpers.atoi(environ.get(b'BUP_FORCE_TTY'))
+        buglvl = int(environ.get(b'BUP_DEBUG', 0))
+        force_tty = int(environ.get(b'BUP_FORCE_TTY', 0))
         tty_width = environ.get(b'BUP_TTY_WIDTH', None)
         if tty_width is not None:
-            tty_width = b'BUP_TTY_WIDTH=%d' % helpers.atoi(tty_width)
+            tty_width = b'BUP_TTY_WIDTH=%d' % int(tty_width)
         else:
             tty_width = b''
         cmd = b"""