#NEWLINE# def get_application_logfile( argv ) : #NEWLINE# #INDENT# for argi in range ( len ( argv ) ) : #NEWLINE# #INDENT# if ( ( argi < ( len ( argv ) - 1 ) ) and ( argv [ argi ] in [ '--logfile' , '--log-file' ] ) ) : #NEWLINE# #INDENT# return argv [ ( argi + 1 ) ] #NEWLINE# #UNINDENT# if ( argv [ argi : ( argi + 2 ) ] == [ 'bash' , '-c' ] ) : #NEWLINE# #INDENT# argv1 = shlex . split ( argv [ ( argi + 2 ) ] ) #NEWLINE# return get_application_logfile ( argv1 )