Compare commits
2 Commits
4708a16bdf
...
58370148bc
Author | SHA1 | Date | |
---|---|---|---|
58370148bc | |||
932fbc18e2 |
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/python3
|
||||
"""Zephir-cmd-input script
|
||||
"""
|
||||
from sys import exit, argv
|
||||
@ -10,8 +10,8 @@ from cucchiaiata.i18n import _
|
||||
|
||||
def main():
|
||||
try:
|
||||
if argv[1] in ['setting.session.server.configure',
|
||||
'setting.session.servermodel.configure']:
|
||||
if len(argv) > 2 and argv[1] in ['setting.session.server.configure',
|
||||
'setting.session.servermodel.configure']:
|
||||
Configuration().get()
|
||||
else:
|
||||
parser = Parser()
|
||||
|
@ -26,10 +26,10 @@ version: {version}"""
|
||||
config = load(stream, Loader=SafeLoader)
|
||||
except YAMLError as err:
|
||||
raise Exception(_('Error when creating the config file {}').format(err))
|
||||
|
||||
|
||||
self.url = config['url']
|
||||
self.version = config['version']
|
||||
self.debug = 'debug' in config
|
||||
self.debug = config.get('debug', False)
|
||||
self.remote_url = 'http://{}/api/{}'.format(self.url, self.version)
|
||||
self.token_file = join(expanduser("~"), '.zephir-client.jwt.token')
|
||||
self.indent = config.get('indent', 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user