Skip to content
Snippets Groups Projects
Commit 2be9c362 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'reduce-configureable-verbosity' into 'master'

Reduce Configurable c'tor verbosity

See merge request atlas/athena!37238
parents 00379ed3 5c4c2de9
No related branches found
No related tags found
No related merge requests found
...@@ -124,10 +124,6 @@ class Configurable( six.with_metaclass (ConfigurableMeta.ConfigurableMeta, objec ...@@ -124,10 +124,6 @@ class Configurable( six.with_metaclass (ConfigurableMeta.ConfigurableMeta, objec
try: try:
setattr( conf, n, v ) setattr( conf, n, v )
except AttributeError as originalAttributeError: except AttributeError as originalAttributeError:
# rather annoying that we have to be somewhat silent here (the
# most common cases are 'name' and user kw args to be supplied
# to an overridden __init__)
log.debug( 'not accepting keyword "%s" as a property', n )
# now for a completely different can of worms ... # now for a completely different can of worms ...
acceptableKeyWord = False acceptableKeyWord = False
...@@ -149,7 +145,6 @@ class Configurable( six.with_metaclass (ConfigurableMeta.ConfigurableMeta, objec ...@@ -149,7 +145,6 @@ class Configurable( six.with_metaclass (ConfigurableMeta.ConfigurableMeta, objec
# times, but we shouldn't be in this loop too often anyway # times, but we shouldn't be in this loop too often anyway
confinit = getattr( confklass, '__init__' ) confinit = getattr( confklass, '__init__' )
if n in six.get_function_code(confinit).co_varnames: if n in six.get_function_code(confinit).co_varnames:
log.debug( 'accepting keyword "%s" as an argument for %s.__init__', n, confklass.__name__ )
acceptableKeyWord = True acceptableKeyWord = True
break break
except AttributeError: except AttributeError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment