def _merge_extraconfig(existing, changes):
 existing = (existing or [])
 if changes:
  for c in changes:
   if (len([x for x in existing if (x.key == c.key)]) > 0):
    extraConf = [x for x in existing if (x.key == c.key)][0]
    extraConf.value = c.value
   else:
    existing.append(c)
 return existing

def _merge_extraconfig ( existing , changes ) : existing = ( existing or [ ] ) if changes : for c in changes : if ( len ( [ x for x in existing if ( x . key == c . key ) ] ) > 0 ) : extraConf = [ x for x in existing if ( x . key == c . key ) ] [ 0 ] extraConf . value = c . value else : existing . append ( c ) return existing
imposes the changes in extraconfig over the existing extraconfig .