#NEWLINE# def process_flags( flags = None ) : #NEWLINE# #INDENT# 'Uses the command-line flags to set the logging level.\n\n    Args:\n    argv: List of command line arguments passed to the python script.\n    ' #NEWLINE# if ( e is None ) : #NEWLINE# #INDENT# flags = [ ] #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# FLAGS ( flags ) #NEWLINE# #UNINDENT# except gflags . FlagsError as e : #NEWLINE# #INDENT# print ( ( '%s\nUsage: %s ARGS\n%s' % ( e , str ( flags ) , FLAGS ) ) ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# logging . getLogger ( ) . setLevel ( getattr ( logging , FLAGS . logging_level ) )