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>
try:
sys.exit(main())
except KeyboardInterrupt:
+ if global_config is None:
+ raise
if global_config.debug:
logger.debug('Terminate by user')
else:
else:
sys.exit(2)
except Exception as e:
+ if global_config is None:
+ raise
if global_config.debug:
logger.debug(str(e))
else: