#NEWLINE# def __iter__( self , blocks = None , current_indent = 0 , spacer = ' ' ) : #NEWLINE# #INDENT# 'Iterates the dumped nginx content.' #NEWLINE# blocks = ( blocks or self . blocks ) #NEWLINE# for ( key , values ) in blocks : #NEWLINE# #INDENT# indentation = ( spacer * current_indent ) #NEWLINE# if isinstance ( key , list ) : #NEWLINE# #INDENT# if current_indent : #NEWLINE# #INDENT# ( yield '' ) #NEWLINE# #UNINDENT# ( yield ( ( indentation + spacer . join ( key ) ) + ' {' ) ) #NEWLINE# for parameter in values : #NEWLINE# #INDENT# dumped = self . __iter__ ( [ parameter ] , ( current_indent + self . indentation ) ) #NEWLINE# for line in dumped : #NEWLINE# #INDENT# ( yield line ) #NEWLINE# #UNINDENT# #UNINDENT# ( yield ( indentation + '}' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( key == '#' ) : #NEWLINE# #INDENT# ( yield ( ( ( spacer * current_indent ) + key ) + values ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( values is None ) : #NEWLINE# #INDENT# ( yield ( ( ( spacer * current_indent ) + key ) + ';' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( yield ( ( ( ( ( spacer * current_indent ) + key ) + spacer ) + values ) + ';' ) )