qvm-template: improve error reporting
Do not print the whole traceback by default - do that only when --verbose is used.
This commit is contained in:
parent
8795668233
commit
ce36dc55c5
@ -1477,6 +1477,7 @@ def main(args: typing.Optional[typing.Sequence[str]] = None,
|
|||||||
if p_args.updatevm is UPDATEVM:
|
if p_args.updatevm is UPDATEVM:
|
||||||
p_args.updatevm = app.updatevm
|
p_args.updatevm = app.updatevm
|
||||||
|
|
||||||
|
try:
|
||||||
if p_args.refresh:
|
if p_args.refresh:
|
||||||
qrexec_repoquery(p_args, app, refresh=True)
|
qrexec_repoquery(p_args, app, refresh=True)
|
||||||
|
|
||||||
@ -1509,6 +1510,10 @@ def main(args: typing.Optional[typing.Sequence[str]] = None,
|
|||||||
repolist(p_args, app)
|
repolist(p_args, app)
|
||||||
else:
|
else:
|
||||||
parser.error('Command \'%s\' not supported.' % p_args.command)
|
parser.error('Command \'%s\' not supported.' % p_args.command)
|
||||||
|
except Exception as e: # pylint: disable=broad-except
|
||||||
|
print('ERROR: ' + str(e), file=sys.stderr)
|
||||||
|
app.log.debug(str(e), exc_info=sys.exc_info())
|
||||||
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user