def _add_directives(block, directives, replace):
 for directive in directives:
  _add_directive(block, directive, replace)
 if (block and ('\n' not in block[(-1)])):
  block.append(nginxparser.UnspacedList('\n'))

def _add_directives ( block , directives , replace ) : for directive in directives : _add_directive ( block , directive , replace ) if ( block and ( '\n' not in block [ ( - 1 ) ] ) ) : block . append ( nginxparser . UnspacedList ( '\n' ) )
adds or replaces directives in a config block .