Compare commits

...

2 Commits

2 changed files with 5 additions and 5 deletions

View File

@ -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()

View File

@ -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)