Kaydet (Commit) a5f8c422 authored tarafından Skip Montanaro's avatar Skip Montanaro

* when given, port should be converted to int

* when connecting, if the port is non-standard, display it as well
üst 7dfb02d0
......@@ -55,6 +55,7 @@ def main():
port = 0
if ':' in host:
host, port = host.split(':', 1)
port = int(port)
try:
auth = netrc.netrc().authenticators(host)
if auth is not None:
......@@ -81,7 +82,8 @@ def main():
if args[3:]: usage('too many arguments')
#
f = ftplib.FTP()
if verbose: print 'Connecting to %s...' % `host`
if verbose: print "Connecting to '%s%s'..." % (host,
(port and ":%d"%port or ""))
f.connect(host,port)
if not nologin:
if verbose:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment