disable setting fields to readonly based on user's privilege in UserAdmin
[plstackapi.git] / planetstack / planetstack-config.py
1 #!/usr/bin/python
2 import sys
3 from planetstack.config import Config
4
5 def help():
6     print "syntax: %s get name [default]" % sys.argv[0]
7
8 def 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
25 main()