only run main() if we weren't imported (allows the file to be used
authorAaron Klingaman <alk@cs.princeton.edu>
Wed, 11 Jan 2006 22:58:32 +0000 (22:58 +0000)
committerAaron Klingaman <alk@cs.princeton.edu>
Wed, 11 Jan 2006 22:58:32 +0000 (22:58 +0000)
in the api)

pod.py

diff --git a/pod.py b/pod.py
index 7e406df..58bd1f5 100755 (executable)
--- 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()