From: Avery Pennarun Date: Tue, 1 Feb 2011 06:13:00 +0000 (-0800) Subject: If you specified the port number on the command line, convert it to an int. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=22d01e1a8077df173e03c6c7d6141fecbcdffaca;p=packages%2Fb%2Fbup.git If you specified the port number on the command line, convert it to an int. This gets rid of an exception. Signed-off-by: Avery Pennarun --- diff --git a/lib/bup/client.py b/lib/bup/client.py index 3a0bb42..f06d549 100644 --- a/lib/bup/client.py +++ b/lib/bup/client.py @@ -78,7 +78,7 @@ class Client: raise ClientError, 'connect: %s' % e, sys.exc_info()[2] elif self.protocol == 'bup': self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - self.sock.connect((self.host, self.port or 1982)) + self.sock.connect((self.host, atoi(self.port) or 1982)) self.sockw = self.sock.makefile('wb') self.conn = DemuxConn(self.sock.fileno(), self.sockw) if self.dir: