blob: 7aa375b39022c72ae3ea7beb3f0ca66baf10d7eb [file] [log] [blame]
Scott Bakera381a412014-05-15 15:35:27 -07001#!/usr/bin/python
Scott Bakerd14ffa42014-05-15 15:29:47 -07002import sys
3from planetstack.config import Config
4
5def help():
6 print "syntax: %s get name [default]" % sys.argv[0]
7
8def main():
9 c = Config()
10
11 if len(sys.argv)<=1:
12 help()
13 return
14
15 if sys.argv[1] == "get":
16 if len(sys.argv)==4:
17 print getattr(c, sys.argv[2], sys.argv[3])
18 elif len(sys.argv)==3:
19 print getattr(c, sys.argv[2])
20 else:
21 help()
22 else:
23 help()
24
25main()