# HG changeset patch # User Laurent Peuch # Date 1558564384 -7200 # Node ID 5c432a7fc442e170c9005666131b01a88a5c9334 # Parent cc681b6fcffab8fea64b33fa2736769ed6276797 [migration/pdb] display traceback instead of only the exception for easier debugging Closes #17219820 diff -r cc681b6fcffa -r 5c432a7fc442 cubicweb/server/migractions.py --- a/cubicweb/server/migractions.py Wed May 22 17:10:06 2019 +0200 +++ b/cubicweb/server/migractions.py Thu May 23 00:33:04 2019 +0200 @@ -32,6 +32,7 @@ import tarfile import tempfile import shutil +import traceback import os.path as osp from datetime import datetime from glob import glob @@ -1456,8 +1457,8 @@ cu = self.cnx.system_sql(sql, args) except Exception: _, ex, traceback_ = sys.exc_info() - if self.confirm('Error: %s\nabort?' % ex, - pdb=True, traceback=traceback_): + traceback.print_exc() + if self.confirm('abort?', pdb=True, traceback=traceback_): raise return try: @@ -1483,8 +1484,8 @@ res = execute(rql, kwargs, build_descr=build_descr) except Exception: _, ex, traceback_ = sys.exc_info() - if self.confirm('Error: %s\nabort?' % ex, - pdb=True, traceback=traceback_): + traceback.print_exc() + if self.confirm('abort?', pdb=True, traceback=traceback_): raise return res @@ -1574,8 +1575,8 @@ return self._h._cw.execute(rql, kwargs) except Exception: _, ex, traceback_ = sys.exc_info() - if self._h.confirm('Error: %s\nabort?' % ex, - pdb=True, traceback=traceback_): + traceback.print_exc() + if self._h.confirm('abort?', pdb=True, traceback=traceback_): raise else: raise StopIteration