]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/client.py
If you specified the port number on the command line, convert it to an int.
[bup.git] / lib / bup / client.py
index 3a0bb427a1bee94b93f7cc5d7ac347ac7a4a42a2..f06d54965979d0c92ca36044af24a5c62c9668e3 100644 (file)
@@ -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: