mirror of https://github.com/python/cpython
Allow this script to act like a module by only calling main() if
__name__ == '__main__'. Closes SF bug #110844.
This commit is contained in:
parent
1cca9e29f9
commit
64850efa39
|
@ -392,4 +392,6 @@ def writedict(dict, filename):
|
|||
pass
|
||||
os.rename(tempname, filename)
|
||||
|
||||
main()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue