From 62a07673daf9b15d4f10f65b5fc3c1efd06d1377 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Wed, 14 Jul 2010 02:31:44 -0400 Subject: [PATCH] client.py: raising a particular rare exception caused a syntax error. Signed-off-by: Avery Pennarun --- lib/bup/client.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/bup/client.py b/lib/bup/client.py index e471cf5..a642e4d 100644 --- a/lib/bup/client.py +++ b/lib/bup/client.py @@ -48,16 +48,16 @@ class Client: self.cachedir = git.repo('index-cache/%s' % re.sub(r'[^@\w]', '_', "%s:%s" % (host, dir))) - try: - if is_reverse: - self.pout = os.fdopen(3, 'rb') - self.pin = os.fdopen(4, 'wb') - else: + if is_reverse: + self.pout = os.fdopen(3, 'rb') + self.pin = os.fdopen(4, 'wb') + else: + try: self.p = ssh.connect(host, 'server') self.pout = self.p.stdout self.pin = self.p.stdin - except OSError, e: - raise ClientError, 'exec %r: %s' % (argv[0], e), sys.exc_info()[2] + except OSError, e: + raise ClientError, 'connect: %s' % e, sys.exc_info()[2] self.conn = Conn(self.pout, self.pin) if dir: dir = re.sub(r'[\r\n]', ' ', dir) -- 2.39.2