From: Aaron Klingaman Date: Wed, 11 Jan 2006 22:58:32 +0000 (+0000) Subject: only run main() if we weren't imported (allows the file to be used X-Git-Tag: myplc-0_4-rc1~3 X-Git-Url: http://git.onelab.eu/?p=pingofdeath.git;a=commitdiff_plain;h=69432fc6cbaad7cbf91f98cdaa3c4dd709edf3ac only run main() if we weren't imported (allows the file to be used in the api) --- diff --git a/pod.py b/pod.py index 7e406df..58bd1f5 100755 --- a/pod.py +++ b/pod.py @@ -138,4 +138,5 @@ def main(): pod = protos.get(protocol,noop_pod) pod(host,key) -main() +if __name__ == '__main__': + main()