mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
python3: add traceback.print_exc to help debugging
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -351,6 +351,8 @@ class ifupdownMain:
|
||||
# if read_saved_state fails, state file might be corrupt.
|
||||
# Ignore old state and continue
|
||||
self.logger.warning('error reading state (%s)' %str(e))
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
else:
|
||||
self.flags.STATEMANAGER_UPDATE = False
|
||||
self._delay_admin_state = True if self.config.get(
|
||||
|
||||
@@ -73,6 +73,8 @@ class Ifupdown2:
|
||||
# else:
|
||||
if log:
|
||||
log.error('main exception: ' + str(e))
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
else:
|
||||
print(str(e))
|
||||
# if args and not args.debug:
|
||||
|
||||
Reference in New Issue
Block a user