Skip to content
Snippets Groups Projects
Commit 725b211b authored by Pavel Kácha's avatar Pavel Kácha
Browse files

More pythonic "main" structure

parent fa77bc2f
No related branches found
No related tags found
No related merge requests found
......@@ -126,6 +126,7 @@ def gen_random_idea():
return event
def main():
wclient = Client(**read_cfg("warden_client.cfg"))
# Also inline arguments are possible:
# wclient = Client(
......@@ -159,3 +160,7 @@ print "=== Server info ==="
info = wclient.getInfo()
if not isinstance(info, Error):
pprint(info)
if __name__ == "__main__":
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment