projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cca9e2
)
Allow this script to act like a module by only calling main() if
author
Barry Warsaw
<barry@python.org>
Sat, 16 Sep 2000 22:09:51 +0000
(22:09 +0000)
committer
Barry Warsaw
<barry@python.org>
Sat, 16 Sep 2000 22:09:51 +0000
(22:09 +0000)
__name__ == '__main__'. Closes SF bug #110844.
Tools/scripts/ftpmirror.py
patch
|
blob
|
history
diff --git
a/Tools/scripts/ftpmirror.py
b/Tools/scripts/ftpmirror.py
index 857ba76810629e3d239ada10acb718358c0cb082..4b02714f7965e1b849886659d40b7c361402d3f8 100755
(executable)
--- 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()