Skip to content

Commit

Permalink
Py3.4: Pass ConfigParser's extra kwargs through
Browse files Browse the repository at this point in the history
In Python 3.4 ConfigParser has it's own string interpolation which recursively
calls get, but with extra kwargs, raw and fallback.

Accept these and pass them straight on to ConfigParser
  • Loading branch information
lentinj committed Oct 23, 2015
1 parent 8faff7c commit d635288
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def __init__(self, defaults, *args, **kwargs):
self.defaults = defaults
ConfigParser.__init__(self, *args, **kwargs)

def get(self, section, key):
def get(self, section, key, **kwargs):
section = str(section).lower()
key = str(key).lower()
d = self.defaults
Expand All @@ -315,7 +315,7 @@ def get(self, section, key):

# ...then the config file
elif self.has_option(section, key):
return expand_env_var(ConfigParser.get(self, section, key))
return expand_env_var(ConfigParser.get(self, section, key, **kwargs))

# ...then the defaults
elif section in d and key in d[section]:
Expand Down

0 comments on commit d635288

Please sign in to comment.