mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-15 22:44:41 +00:00
Handle exceptions when global_config is not yet set in fedabipkgdiff
Handling an exception in fedabipkgdiff requires that the global_config object is set because we reference some if its data members. This patch avoids requiring the global_config object so that users can still be aware of the reason of the exception when that object is not yet set. * tools/fedabipkgdiff: When handling an exception, if the global_config object is not yet set then just let the exception through. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
ae2be278fd
commit
d000f75c45
@ -1490,6 +1490,8 @@ if __name__ == '__main__':
|
||||
try:
|
||||
sys.exit(main())
|
||||
except KeyboardInterrupt:
|
||||
if global_config is None:
|
||||
raise
|
||||
if global_config.debug:
|
||||
logger.debug('Terminate by user')
|
||||
else:
|
||||
@ -1499,6 +1501,8 @@ if __name__ == '__main__':
|
||||
else:
|
||||
sys.exit(2)
|
||||
except Exception as e:
|
||||
if global_config is None:
|
||||
raise
|
||||
if global_config.debug:
|
||||
logger.debug(str(e))
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user