X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fbup%2Fssh.py;h=34b5f3c38a2c30740d97dd097a9906c1a8e00f5f;hb=c4846ab44a9f4b182715ec413a3fc1b8334e5107;hp=344355aa1f2b537140b36367d5d4b4d4e56021ab;hpb=9bb94e0f684e311f7a8c71a912b6d0e812a04e5f;p=bup.git diff --git a/lib/bup/ssh.py b/lib/bup/ssh.py index 344355a..34b5f3c 100644 --- a/lib/bup/ssh.py +++ b/lib/bup/ssh.py @@ -5,7 +5,7 @@ import sys, os, re, subprocess from bup import helpers, path -def connect(rhost, port, subcmd): +def connect(rhost, port, subcmd, stderr=None): """Connect to 'rhost' and execute the bup subcommand 'subcmd' on it.""" assert(not re.search(r'[^\w-]', subcmd)) nicedir = re.sub(r':', "_", path.exedir()) @@ -39,4 +39,5 @@ def connect(rhost, port, subcmd): os.environ.get('PATH', '')]) os.setsid() return subprocess.Popen(argv, stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=stderr, preexec_fn=setup)