Skip to content
Snippets Groups Projects
Commit 6b70e873 authored by Matthieu Lamalle's avatar Matthieu Lamalle Committed by Lionel Morin
Browse files

fix_304_305

parent 7217acf0
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,23 @@
"""Zephir-cmd-input script
"""
import yaml
from zephir_client import remote_json_to_config, cmdline_factory, send
import sys
from zephir_client import remote_json_to_config, cmdline_factory, send, remove_token
import config as zconf
zcliconf = zconf.ZcliConfig()
URL = zcliconf.url
VERSION = zcliconf.version
OUTPUT = zcliconf.output
OUTPUT = 'yaml'
for arg in sys.argv:
if arg == '--json':
OUTPUT = 'json'
sys.argv.remove(arg)
if arg == '--login':
remove_token()
sys.argv.remove(arg)
remote_config = remote_json_to_config(URL, VERSION)
config = cmdline_factory(remote_config)
......
"""Zephir Client library
"""
import sys
import os
import getpass
from pathlib import Path
from json import loads, dumps
......@@ -93,6 +94,10 @@ def authenticate(url):
pass
return token
def remove_token():
if os.path.exists(token_file):
os.remove(token_file)
def help():
print("""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment