diff options
author | Barry Warsaw <barry@python.org> | 2000-09-16 22:09:51 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2000-09-16 22:09:51 (GMT) |
commit | 64850efa39c7e0442718f599c27fade5c9282311 (patch) | |
tree | 28556ab06ef4d75469f2dbffc89c286f04f37078 /Tools/scripts | |
parent | 1cca9e29f97b4778e07e4a8948e0a677334f8560 (diff) | |
download | cpython-64850efa39c7e0442718f599c27fade5c9282311.zip cpython-64850efa39c7e0442718f599c27fade5c9282311.tar.gz cpython-64850efa39c7e0442718f599c27fade5c9282311.tar.bz2 |
Allow this script to act like a module by only calling main() if
__name__ == '__main__'. Closes SF bug #110844.
Diffstat (limited to 'Tools/scripts')
-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 857ba76..4b02714 100755 --- a/Tools/scripts/ftpmirror.py +++ b/Tools/scripts/ftpmirror.py @@ -392,4 +392,6 @@ def writedict(dict, filename): pass os.rename(tempname, filename) -main() + +if __name__ == '__main__': + main() |