Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
546aba45
Commit
546aba45
authored
Dec 05, 2002
by
Skip Montanaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow optional port specified as part of the hostname, e.g.,
"www.zope.org:8021".
parent
e867016a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Tools/scripts/ftpmirror.py
Tools/scripts/ftpmirror.py
+6
-3
No files found.
Tools/scripts/ftpmirror.py
View file @
546aba45
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat]
usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat]
[-l username [-p passwd [-a account]]]
[-l username [-p passwd [-a account]]]
hostname [remotedir [localdir]]
hostname
[:port]
[remotedir [localdir]]
-v: verbose
-v: verbose
-q: quiet
-q: quiet
-i: interactive mode
-i: interactive mode
...
@@ -13,7 +13,7 @@ usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat]
...
@@ -13,7 +13,7 @@ usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat]
-r: remove local files/directories no longer pertinent
-r: remove local files/directories no longer pertinent
-l username [-p passwd [-a account]]: login info (default .netrc or anonymous)
-l username [-p passwd [-a account]]: login info (default .netrc or anonymous)
-s pat: skip files matching pattern
-s pat: skip files matching pattern
hostname: remote host
hostname: remote host
w/ optional port separated by ':'
remotedir: remote directory (default initial)
remotedir: remote directory (default initial)
localdir: local directory (default current)
localdir: local directory (default current)
"""
"""
...
@@ -52,6 +52,9 @@ def main():
...
@@ -52,6 +52,9 @@ def main():
account
=
''
account
=
''
if
not
args
:
usage
(
'hostname missing'
)
if
not
args
:
usage
(
'hostname missing'
)
host
=
args
[
0
]
host
=
args
[
0
]
port
=
0
if
':'
in
host
:
host
,
port
=
host
.
split
(
':'
,
1
)
try
:
try
:
auth
=
netrc
.
netrc
().
authenticators
(
host
)
auth
=
netrc
.
netrc
().
authenticators
(
host
)
if
auth
is
not
None
:
if
auth
is
not
None
:
...
@@ -79,7 +82,7 @@ def main():
...
@@ -79,7 +82,7 @@ def main():
#
#
f
=
ftplib
.
FTP
()
f
=
ftplib
.
FTP
()
if
verbose
:
print
'Connecting to %s...'
%
`host`
if
verbose
:
print
'Connecting to %s...'
%
`host`
f
.
connect
(
host
)
f
.
connect
(
host
,
port
)
if
not
nologin
:
if
not
nologin
:
if
verbose
:
if
verbose
:
print
'Logging in as %s...'
%
`login or 'anonymous'`
print
'Logging in as %s...'
%
`login or 'anonymous'`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment