Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def handle_exception(self, e, table=True):
if self.table.row_count > 1 and table:
self.console.print(self.table)
if getattr(sys, 'frozen', False):
sys.tracebacklimit = 0
if isinstance(e, list):
for es in e:
self.console.print(Traceback.from_exception(exc_type=es.__class__, exc_value=es,
traceback=es.__traceback__))
else:
self.console.print(Traceback.from_exception(exc_type=e.__class__, exc_value=e, traceback=e.__traceback__))
def handle_exception(self, e, table=True):
if self.table.row_count > 1 and table:
self.console.print(self.table)
if getattr(sys, 'frozen', False):
sys.tracebacklimit = 0
if isinstance(e, list):
for es in e:
self.console.print(Traceback.from_exception(exc_type=es.__class__, exc_value=es,
traceback=es.__traceback__))
else:
self.console.print(Traceback.from_exception(exc_type=e.__class__, exc_value=e, traceback=e.__traceback__))