Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Commit

Permalink
set up some defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Mar 26, 2012
1 parent dc5c90f commit a4b0225
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions client/tracebin/cmdline.py
Expand Up @@ -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)

Expand All @@ -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.