Skip to content

Commit

Permalink
Lose shim required for pre-Python-2.3 versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmpilato committed Apr 23, 2020
1 parent dd97031 commit a0f7e94
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,6 @@ def overlay_root_options(self, rootname):
if did_overlay:
self.root_options_overlayed = 1

def _get_parser_items(self, parser, section):
"""Basically implement ConfigParser.items() for pre-Python-2.3 versions."""
try:
return self.parser.items(section)
except AttributeError:
d = {}
for option in parser.options(section):
d[option] = parser.get(section, option)
return list(d.items())

def get_authorizer_and_params_hack(self, rootname):
"""Return a 2-tuple containing the name and parameters of the
authorizer configured for use with ROOTNAME.
Expand Down Expand Up @@ -362,7 +352,7 @@ def get_authorizer_and_params_hack(self, rootname):
root_authz_section = 'root-%s|authz-%s' % (rootname, authorizer)
for section in self.parser.sections():
if section == root_authz_section:
for key, value in self._get_parser_items(self.parser, section):
for key, value in self.parser.items():
params[key] = value
return authorizer, params

Expand Down

0 comments on commit a0f7e94

Please sign in to comment.