From 64850efa39c7e0442718f599c27fade5c9282311 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 16 Sep 2000 22:09:51 +0000 Subject: Allow this script to act like a module by only calling main() if __name__ == '__main__'. Closes SF bug #110844. --- Tools/scripts/ftpmirror.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() -- cgit v0.12