1
0
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:
Julien Fortin
2019-10-02 17:09:21 +02:00
parent 7f208e5670
commit 97b96fdd22
2 changed files with 4 additions and 0 deletions

View File

@@ -351,6 +351,8 @@ class ifupdownMain:
# if read_saved_state fails, state file might be corrupt. # if read_saved_state fails, state file might be corrupt.
# Ignore old state and continue # Ignore old state and continue
self.logger.warning('error reading state (%s)' %str(e)) self.logger.warning('error reading state (%s)' %str(e))
import traceback
traceback.print_exc()
else: else:
self.flags.STATEMANAGER_UPDATE = False self.flags.STATEMANAGER_UPDATE = False
self._delay_admin_state = True if self.config.get( self._delay_admin_state = True if self.config.get(

View File

@@ -73,6 +73,8 @@ class Ifupdown2:
# else: # else:
if log: if log:
log.error('main exception: ' + str(e)) log.error('main exception: ' + str(e))
import traceback
traceback.print_exc()
else: else:
print(str(e)) print(str(e))
# if args and not args.debug: # if args and not args.debug: