#NEWLINE# def parse_hours_flag( args ) : #NEWLINE# #INDENT# ' If the `--hours` flag was used, get the time, and remove \n        the flag and the time from the args list.\n        Return FALSE if the flag was not present.\n    ' #NEWLINE# try : #NEWLINE# #INDENT# pos = args . index ( '--hours' ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# hours = args [ ( pos + 1 ) ] #NEWLINE# try : #NEWLINE# #INDENT# hours = float ( hours ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# fprintf ( ( 'GITIME ERROR: %s is not a valid amount of hours. Your commit was NOT made. Try again.' % args ) , file = sys . stderr ) #NEWLINE# sys . exit ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# del args [ ( pos + 1 ) ] #NEWLINE# del args [ pos ] #NEWLINE# return hours