()
Program start and exception handling
Program start and exception handling
Program start and exception handling
def main():
    """Program start and exception handling"""

    exit_status = 0
    try:
        exit_status = UMain(sys.argv).execute()
    except KeyboardInterrupt:
        Msg().out("Info: keyboard interrupt", l=Msg.INF)
        FileUtil().cleanup()
        exit_status = 1
    except SystemExit as error:
        FileUtil().cleanup()
        try:
            exit_status = int(error.args[0])
        except (ValueError, TypeError):
            exit_status = 1
    except:
        FileUtil().cleanup()
        exit_status = 1
        raise
    else:
        FileUtil().cleanup()

    sys.exit(exit_status)
def main ( ) : exit_status = 0 try : exit_status = UMain ( sys . argv ) . execute ( ) except KeyboardInterrupt : Msg ( ) . out ( "Info: keyboard interrupt" , l = Msg . INF ) FileUtil ( ) . cleanup ( ) exit_status = 1 except SystemExit as error : FileUtil ( ) . cleanup ( ) try : exit_status = int ( error . args [ 0 ] ) except ( ValueError , TypeError ) : exit_status = 1 except : FileUtil ( ) . cleanup ( ) exit_status = 1 raise else : FileUtil ( ) . cleanup ( ) sys . exit ( exit_status )