#NEWLINE# def parse_amount( amount ) : #NEWLINE# #INDENT# to_find = [ ] #NEWLINE# try : #NEWLINE# #INDENT# if ( ',' in amount ) : #NEWLINE# #INDENT# temp = amount . split ( ',' ) #NEWLINE# for i in temp : #NEWLINE# #INDENT# to_find . append ( int ( i ) ) #NEWLINE# #UNINDENT# return to_find #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( '-' in amount ) : #NEWLINE# #INDENT# temp = amount . split ( '-' ) #NEWLINE# for i in range ( int ( temp [ 0 ] ) , ( int ( temp [ 1 ] ) + 1 ) ) : #NEWLINE# #INDENT# to_find . append ( i ) #NEWLINE# #UNINDENT# return to_find #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# to_find . append ( int ( amount ) ) #NEWLINE# return to_find #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except ValueError : #NEWLINE# #INDENT# print ( '  ERROR: incorrect value given for update range.' ) #NEWLINE# exit ( )