From 22d01e1a8077df173e03c6c7d6141fecbcdffaca Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Mon, 31 Jan 2011 22:13:00 -0800 Subject: [PATCH] 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 --- lib/bup/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.39.2