commit | a95eaa35f5c48417420fe37472d8148fdbf5ddd5 | [log] [tgz] |
---|---|---|
author | martin f. krafft <madduck@madduck.net> | Sun Jun 16 11:56:41 2013 +0200 |
committer | martin f. krafft <madduck@madduck.net> | Sun Jun 16 11:56:41 2013 +0200 |
tree | 1d5bd053ad8deacda62570b1cc1ced986b0c99a0 | |
parent | a07b4208dcf30cdab35a8021c54a767f0b47cf3c [diff] [blame] |
Handle merging None into lists/dicts Signed-off-by: martin f. krafft <madduck@madduck.net>
diff --git a/mergers/dict/update.py b/mergers/dict/update.py index dd834f0..69e849d 100644 --- a/mergers/dict/update.py +++ b/mergers/dict/update.py
@@ -11,6 +11,9 @@ class DictUpdate(BaseDictMerger): def merge(self, first, second): + if second is None: + return first + ret = first.copy() ret.update(second) return ret