diff options
author | Mike Frysinger <vapier@google.com> | 2021-01-30 00:48:41 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-01-30 00:48:41 +0000 |
commit | 9f4d922b3a32b3407e36cbd87ebc0a723d27e1b1 (patch) | |
tree | 14471782f805a01a4612fc7da5698b51cda8068f | |
parent | 5197623930b8c7b7cad418f2bee37e233e50da90 (diff) | |
parent | 8349d896cdecf42a7bbd52d6a6abee1bc3acbcbf (diff) | |
download | repohooks-9f4d922b3a32b3407e36cbd87ebc0a723d27e1b1.tar.gz |
config: drop Python 2 support am: 8349d896cd
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1566558
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I51a5fd172058f876da8dcf0e177a8b8ac246e6c7
-rw-r--r-- | rh/config.py | 12 |
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.""" |