#NEWLINE# def fromHeaderValue( cls , agentString ) : #NEWLINE# #INDENT# '\n        Attempt to parse an arbitrary user-agent.\n\n        @rtype: C{cls} or C{NoneType}\n        @return: A user agent object, or C{None} if parsing fails.\n        ' #NEWLINE# for parser in [ 'GECKO' , 'WEBKIT' , 'MSIE' , 'OPERA' ] : #NEWLINE# #INDENT# agent = getattr ( cls , ( 'parse_' + parser ) ) ( agentString ) #NEWLINE# if ( agent is not None ) : #NEWLINE# #INDENT# return agent #NEWLINE# #UNINDENT# #UNINDENT# return None