forked from github/kensanata.oddmuse
only call main() when __name__ == "__main__"
This commit is contained in:
3
wikiadd
3
wikiadd
@@ -91,4 +91,5 @@ def parse_wiki_location(where):
|
||||
(scheme, host, path, params, query, fragment) = urlparse.urlparse(where)
|
||||
return (host, path+params, query)
|
||||
|
||||
main()
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
3
wikiput
3
wikiput
@@ -105,4 +105,5 @@ def parse_wiki_location(where):
|
||||
path = "/".join(list)
|
||||
return (host, path+params, query)
|
||||
|
||||
main()
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# $Id: wikiupload,v 1.4 2005/07/25 12:33:03 as Exp $
|
||||
# $Id: wikiupload,v 1.5 2006/02/26 02:00:54 as Exp $
|
||||
|
||||
import mimetypes, httplib, urllib, re, urlparse, sys, getopt
|
||||
from time import time
|
||||
@@ -141,4 +141,5 @@ def parse_wiki_location(where):
|
||||
path = "/".join(list)
|
||||
return (host, path+params, query)
|
||||
|
||||
main()
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user