summaryrefslogtreecommitdiff
path: root/python/server.py
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-10 14:16:40 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-10 14:16:40 -0500
commit91e8378f04d33137f8e6281928ae70af12be3b2b (patch)
tree1fe03ea8d7eeb21aa4f923373fbbd8c06f536d75 /python/server.py
parent5ffa987daf4d97c52066e4c28733d826d3726297 (diff)
downloadfork-ledger-91e8378f04d33137f8e6281928ae70af12be3b2b.tar.gz
fork-ledger-91e8378f04d33137f8e6281928ae70af12be3b2b.tar.bz2
fork-ledger-91e8378f04d33137f8e6281928ae70af12be3b2b.zip
Fixes to Python importing; removed "hello" precommand
Diffstat (limited to 'python/server.py')
-rw-r--r--python/server.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/server.py b/python/server.py
index 64a91ca3..3c6ddb91 100644
--- a/python/server.py
+++ b/python/server.py
@@ -20,7 +20,7 @@ class LedgerHandler(BaseHTTPRequestHandler):
except Exception:
print "Saw exception in POST handler"
-def cmd_server():
+def main(*args):
try:
port = 9000
server = HTTPServer(('', port), LedgerHandler)
@@ -31,3 +31,6 @@ def cmd_server():
print "Shutting down server"
server.socket.close()
+print __name__
+if __name__ == '__main__':
+ main()