diff options
author | Skip Montanaro <skip@pobox.com> | 2002-12-05 02:43:14 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2002-12-05 02:43:14 (GMT) |
commit | a5f8c42268dd2095969a8a721fa75bf2a2e37434 (patch) | |
tree | 0b2d4732908ee2a8122ce136c437e2779ec0a14e /Tools | |
parent | 7dfb02d09a550908b3d70e2d5ab682d09d63c8d1 (diff) | |
download | cpython-a5f8c42268dd2095969a8a721fa75bf2a2e37434.zip cpython-a5f8c42268dd2095969a8a721fa75bf2a2e37434.tar.gz cpython-a5f8c42268dd2095969a8a721fa75bf2a2e37434.tar.bz2 |
* when given, port should be converted to int
* when connecting, if the port is non-standard, display it as well
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/ftpmirror.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/scripts/ftpmirror.py b/Tools/scripts/ftpmirror.py index 0886af6..2e3b215 100755 --- a/Tools/scripts/ftpmirror.py +++ b/Tools/scripts/ftpmirror.py @@ -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: |