Permalink
Browse files

when merging logging configs, replace old list values instead of appe…

…nding
  • Loading branch information...
1 parent 0141106 commit c6c02251974b5d2bf28164549c142ea65ecec072 @newbrough newbrough committed Sep 13, 2012
Showing with 4 additions and 11 deletions.
  1. +1 −1 setup.py
  2. +3 −10 src/ooi/logging/configure.py
View
@@ -1,7 +1,7 @@
from distutils.core import setup
setup(name='utilities',
- version='2012.9.8',
+ version='2012.9.13',
author='Jonathan Newbrough',
author_email='jonathan.newbrough@gyregroup.com',
url='https://github.com/newbrough/utilities',
@@ -82,17 +82,10 @@ def _read_resource(self, resource_name):
return None
def _add_dictionary(self, current, added):
- """ from pyon.core.common, except allow recursion (logging config isn't too deep) and combine lists """
+ """ from pyon.core.common, except allow recursion (logging config isn't too deep) """
for key in added:
- if key in current:
- if isinstance(current[key], collections.Mapping):
- self._add_dictionary(current[key], added[key])
- elif isinstance(current[key], list):
- for item in added[key]:
- if item not in current[key]:
- current[key].append(item)
- else:
- current[key] = added[key]
+ if key in current and isinstance(current[key], collections.Mapping):
+ self._add_dictionary(current[key], added[key])
else:
current[key] = added[key]

0 comments on commit c6c0225

Please sign in to comment.