Permalink
Browse files

1. If enable is n, dont ask rest of the questions 2. Fix typos

  • Loading branch information...
pingali committed Apr 23, 2016
1 parent abca8f7 commit 4031a6c6f35bc54cf0b01f6105281139eaa4fce3
View
@@ -100,6 +100,8 @@ def init(globalvars=None, show=False):
if not show:
update(globalvars)
+ print("Complete init")
+
def input_with_default(message, default):
res = input("%s [%s]: " %(message, default))
@@ -134,12 +136,12 @@ def update(globalvars):
},
'user.fullname': {
'value': defaults.get('user.fullname',''),
- 'description': "Short Name",
+ 'description': "Full Name",
'validator': NonEmptyValidator()
},
'user.name': {
'value': defaults.get('user.name', getpass.getuser()),
- 'description': "Full Name",
+ 'description': "Name",
'validator': NonEmptyValidator()
},
}
@@ -200,6 +202,8 @@ def update(globalvars):
config[name][v] = choice
+ if v == 'enable' and choice == 'n':
+ break
with open(profileini, 'w') as fd:
config.write(fd)
@@ -38,8 +38,8 @@ def config(self, what='get', params=None):
'variables': ['enable', 'token', 'url'],
'defaults': {
'enable': {
- 'value': "y",
- "description": "Enable generic Metadata server?",
+ 'value': "n",
+ "description": "Enable a generic Metadata server? (see documentation)",
'validator': ChoiceValidator(['y','n'])
},
'token': {
@@ -118,6 +118,7 @@ def parse_diff(self, diff):
("+++", ["New row",0]),
("---", ["Deleted row", 0]),
("+", ["Atleast one cell change",0]),
+ ("->", ["Changed rows",0]),
(":", ["Reordered row",0])
]))
])
@@ -162,7 +162,7 @@ def gather_configs(self):
c.update({
'description': mgr.description
})
- print("Gathering configuration from ", c)
+ # print("Gathering configuration from ", c)
configs.append(c)
return configs

0 comments on commit 4031a6c

Please sign in to comment.