#NEWLINE# def main( args = None ) : #NEWLINE# #INDENT# parser = setup_parser ( ) #NEWLINE# opts = parser . parse_args ( args = args ) #NEWLINE# rc = 0 #NEWLINE# try : #NEWLINE# #INDENT# opts . func ( opts ) #NEWLINE# #UNINDENT# except InsufficientPermissionsError as e : #NEWLINE# #INDENT# puts_err ( ( ( colored . red ( '\nInsufficient permissions error:\n' ) + str ( e ) ) + '\n' ) ) #NEWLINE# rc = 1 #NEWLINE# #UNINDENT# except BlockadeError as e : #NEWLINE# #INDENT# puts_err ( ( ( colored . red ( '\nError:\n' ) + str ( e ) ) + '\n' ) ) #NEWLINE# rc = 1 #NEWLINE# #UNINDENT# except KeyboardInterrupt : #NEWLINE# #INDENT# puts_err ( colored . red ( 'Caught Ctrl-C. exiting!' ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# puts_err ( colored . red ( '\nUnexpected error! This may be a Blockade bug.\n' ) ) #NEWLINE# traceback . print_exc ( ) #NEWLINE# rc = 2 #NEWLINE# #UNINDENT# sys . exit ( rc )