Permalink
Browse files

set up some defaults.

  • Loading branch information...
1 parent dc5c90f commit a4b0225cded04a84a37b46eab910c44db0406754 @alex committed Mar 26, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 client/tracebin/cmdline.py
View
@@ -32,8 +32,15 @@ def main(argv):
if args.action != "dump" and args.dump_format:
parser.error()
+ config = ConfigParser()
+
+ # Setup some defaults, eventually there should be some sort of better
+ # abstraction for this.
+ config.add_section("server")
+ config.set("server", "host", "localhost")
+ config.set("server", "port", "8000")
+
if args.config:
- config = ConfigParser()
with args.config:
config.readfp(args.config)
@@ -54,4 +61,4 @@ def main(argv):
response.raise_for_status()
print(response.headers["Location"])
- return 0
+ return 0

0 comments on commit a4b0225

Please sign in to comment.