# HG changeset patch # User Milka Kuzminski # Date 2020-12-21 16:17:24 # Node ID ba9a97a80fcfbc37020801dfa8d720fcec6c9b65 # Parent d20c3f2da658d33fa0455a0008f8e606a20172d4 exc: fixed exceptions prefix (again) diff --git a/rhodecode/lib/vcs/exceptions.py b/rhodecode/lib/vcs/exceptions.py --- a/rhodecode/lib/vcs/exceptions.py +++ b/rhodecode/lib/vcs/exceptions.py @@ -218,8 +218,9 @@ def map_vcs_exceptions(func): if kind: if any(e.args): - args = [a for a in e.args] - args.insert(0, '{}:'.format(exc_name)) # prefix first arg with org exc name + _args = [a for a in e.args] + # replace the first argument with a prefix exc name + args = ['{}:'.format(exc_name, _args[0] if _args else '?')] + _args[1:] else: args = [__traceback_info__ or '{}: UnhandledException'.format(exc_name)] if debug or __traceback_info__ and kind not in ['unhandled', 'lookup']: