diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-03-16 18:28:26 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-03-16 18:28:26 +0200 |
commit | 6edc972b24cb9e6922c07cc124708a8fd8680198 (patch) | |
tree | 9f0220967abf8a4eee294ebd67a041dedcb3ddb8 | |
parent | 50a5e674ae97c49c1296b2b7d95e4ddaa9088776 (diff) | |
download | effitool-6edc972b24cb9e6922c07cc124708a8fd8680198.tar.gz |
Add: print a nicer error message for errors
-rwxr-xr-x | effitool | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -316,8 +316,9 @@ class Tool: token = self.get_admin_token(server) api = HTTPAPI(server['url']) + rid = args['rid'] headers = { - 'Muck-Id': args['rid'], + 'Muck-Id': rid, } memb = api.get_json(token, '/memb', headers=headers) @@ -426,7 +427,10 @@ def process_args(config): args = vars(p.parse_args()) func = args['func'] - func(args) + try: + func(args) + except Exception as e: + sys.exit(str(e)) def main(): |