summaryrefslogtreecommitdiff
path: root/gbp/config.py
diff options
context:
space:
mode:
authorbiao716.wang <biao716.wang@samsung.com>2022-10-28 12:42:00 +0900
committerbiao716.wang <biao716.wang@samsung.com>2022-10-28 22:27:21 +0900
commit1e5da010ab8cb514b495eb7c1d3afce6baec7f4d (patch)
tree5b76563463d1b46ff399bf99907c54e5ce03e561 /gbp/config.py
parentb0bfbb2cab1b0ebdc9657c89de6bc21ab0de173b (diff)
downloadgit-buildpackage-1e5da010ab8cb514b495eb7c1d3afce6baec7f4d.tar.gz
git-buildpackage-1e5da010ab8cb514b495eb7c1d3afce6baec7f4d.tar.bz2
git-buildpackage-1e5da010ab8cb514b495eb7c1d3afce6baec7f4d.zip
port code from python2.x to python3.x
Change-Id: I798c72d07e44839cc5d1e25ec75fca0bd8068567 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
Diffstat (limited to 'gbp/config.py')
-rw-r--r--gbp/config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/config.py b/gbp/config.py
index 267400ce..0f0bdc6f 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -17,7 +17,7 @@
"""handles command line and config file option parsing for the gbp commands"""
from optparse import OptionParser, OptionGroup, Option, OptionValueError
-from ConfigParser import SafeConfigParser, NoSectionError
+from configparser import SafeConfigParser, NoSectionError
from copy import copy
import os.path
import tempfile
@@ -427,11 +427,11 @@ class GbpOptionParser(OptionParser):
if parser.has_section(cmd):
# Don't use items() until we got rid of the compat sections
# since this pulls in the defaults again
- self.config.update(dict(parser._sections[cmd].items()))
+ self.config.update(dict(list(parser._sections[cmd].items())))
for section in self.sections:
if parser.has_section(section):
- self.config.update(dict(parser._sections[section].items()))
+ self.config.update(dict(list(parser._sections[section].items())))
else:
raise NoSectionError("Mandatory section [%s] does not exist."
% section)