Skip to content

Commit

Permalink
removed space at the end of replacement string during traceback forma…
Browse files Browse the repository at this point in the history
…tting
  • Loading branch information
iLLiCiTiT committed Mar 2, 2020
1 parent c2d9743 commit f289f81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyblish/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ def extract_traceback(exception, fname=None):

formatted_traceback = ''.join(traceback.format_exception(
exc_type, exc_value, exc_traceback))
if 'File "<string>", line ' in formatted_traceback and fname is not None:
if 'File "<string>", line' in formatted_traceback and fname is not None:
_, lineno, func, msg = exception.traceback
fname = os.path.abspath(fname)
exception.traceback = (fname, lineno, func, msg)
formatted_traceback = formatted_traceback.replace(
'File "<string>", line ',
'File "{0}", line '.format(fname))
'File "<string>", line',
'File "{0}", line'.format(fname))
exception.formatted_traceback = formatted_traceback

del(exc_type, exc_value, exc_traceback)
Expand Down

0 comments on commit f289f81

Please sign in to comment.