#NEWLINE# def _split_auth_string( auth_string ) : #NEWLINE# #INDENT# ' split a digest auth string into individual key=value strings ' #NEWLINE# prev = None #NEWLINE# for item in auth_string . split ( ',' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( prev . count ( '"' ) == 1 ) : #NEWLINE# #INDENT# prev = ( '%s,%s' % ( prev , item ) ) #NEWLINE# continue #NEWLINE# #UNINDENT# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# if ( prev == None ) : #NEWLINE# #INDENT# prev = item #NEWLINE# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise StopIteration #NEWLINE# #UNINDENT# #UNINDENT# ( yield prev . strip ( ) ) #NEWLINE# prev = item #NEWLINE# #UNINDENT# ( yield prev . strip ( ) ) #NEWLINE# raise StopIteration