aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-01-29 15:26:09 -0500
committerMike Frysinger <vapier@google.com>2021-01-29 15:35:41 -0500
commit8349d896cdecf42a7bbd52d6a6abee1bc3acbcbf (patch)
tree14471782f805a01a4612fc7da5698b51cda8068f
parent147b6c35e1e87edda7b8db9d28ef5079cf69878d (diff)
downloadrepohooks-8349d896cdecf42a7bbd52d6a6abee1bc3acbcbf.tar.gz
config: drop Python 2 support
Bug: None Test: unittests still pass Change-Id: Ia809f1b8e84bdf0469977f687815a210e600becb
-rw-r--r--rh/config.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/rh/config.py b/rh/config.py
index ed75007..bd7e6fe 100644
--- a/rh/config.py
+++ b/rh/config.py
@@ -75,9 +75,6 @@ class RawConfigParser(configparser.RawConfigParser):
def items(self, section=_UNSET, default=_UNSET):
"""Return a list of (key, value) tuples for the options in |section|."""
if section is _UNSET:
- # Python 3 compat logic. Return a dict of section-to-options.
- if sys.version_info.major < 3:
- return [(x, self.items(x)) for x in self.sections()]
return super(RawConfigParser, self).items()
try:
@@ -87,15 +84,6 @@ class RawConfigParser(configparser.RawConfigParser):
return default
raise
- if sys.version_info.major < 3:
- def read_dict(self, dictionary):
- """Store |dictionary| into ourselves."""
- for section, settings in dictionary.items():
- for option, value in settings:
- if not self.has_section(section):
- self.add_section(section)
- self.set(section, option, value)
-
class PreUploadConfig(object):
"""A single (abstract) config used for `repo upload` hooks."""