Skip to content

Commit

Permalink
update helper func name
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Saunders committed Jun 16, 2016
1 parent 984b498 commit 55b067c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kim/pipelines/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from functools import wraps

from kim.exception import StopPipelineExecution, FieldError
from kim.utils import attr_or_key, set_attr_or_key, merge
from kim.utils import attr_or_key, set_attr_or_key, attr_or_key_update


class Pipe(object):
Expand Down Expand Up @@ -258,7 +258,7 @@ def update_output_to_source(session):
source = session.field.opts.source
try:
if source == '__self__':
merge(session.output, session.data)
attr_or_key_update(session.output, session.data)
else:
set_attr_or_key(session.output, session.field.opts.source, session.data)
except (TypeError, AttributeError):
Expand Down
2 changes: 1 addition & 1 deletion kim/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def set_attr_or_key(obj, name, value):
_set_attr_or_key(obj, components[-1], value)


def merge(obj, value):
def attr_or_key_update(obj, value):
"""If obj is a dict, add keys from value to it with update(),
otherwise use setattr to set every attribute from value on obj
"""
Expand Down

0 comments on commit 55b067c

Please sign in to comment.