From: biao716.wang Date: Wed, 9 Nov 2022 10:32:48 +0000 (+0900) Subject: fix run error with python3.x X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2554cd8b7bb51f1e875467948935caa6df2c6c4f;p=tools%2Fgbs.git fix run error with python3.x Change-Id: I36de6279173e40dbb77472de145a9d284fdee548 Signed-off-by: biao716.wang --- diff --git a/bsr/bsr/__version__.py b/bsr/bsr/__version__.py index 064e1f4..1dd7188 100644 --- a/bsr/bsr/__version__.py +++ b/bsr/bsr/__version__.py @@ -9,4 +9,4 @@ __author__ = 'Hyokeun Jeon' __author_email__ = 'hyokeun.jeon@samsung.com' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2020 Samsung Research' -__cake__ = '\u2728 \U0001f370 \u2728' +__cake__ = '\\u2728 \\U0001f370 \\u2728' diff --git a/gitbuildsys/cmd_build.py b/gitbuildsys/cmd_build.py index a83b274..0009a5f 100644 --- a/gitbuildsys/cmd_build.py +++ b/gitbuildsys/cmd_build.py @@ -426,7 +426,7 @@ def create_autoconf(arch, snapshot, full_build): content += '[general]\nfallback_to_native = true\nprofile = ' + default + '\n' repos_map = {} - for k, v in obs_meta.items(): + for k, v in list(obs_meta.items()): ref_id = ref_meta.get(v) if ref_id == None: ref_id = 'latest' @@ -463,7 +463,7 @@ def create_autoconf(arch, snapshot, full_build): content += '[repo.' + k + '_' + repo + '_pkgs]\n' content += 'url = ' + url + '/builddata/depends/' + v + '_' + repo + '_' + arch + '_revpkgdepends.xml\n' - for k, v in profile_meta.items(): + for k, v in list(profile_meta.items()): content += '[profile.' + k + ']\n' if full_build: v = v[:v.index('repo.' + k) - 1] diff --git a/gitbuildsys/cmd_devel.py b/gitbuildsys/cmd_devel.py index 6fb743e..05c119b 100644 --- a/gitbuildsys/cmd_devel.py +++ b/gitbuildsys/cmd_devel.py @@ -68,8 +68,8 @@ def update_local_conf(repo, values): log.info('Updating local .gbs.conf') with open(conf_fn, 'a+') as conf_fp: parser.readfp(conf_fp) - for section, items in values.items(): - for key, value in items.items(): + for section, items in list(values.items()): + for key, value in list(items.items()): parser.set_into_file(section, key, value) parser.update() diff --git a/gitbuildsys/conf.py b/gitbuildsys/conf.py index 12cf5a6..71d478b 100644 --- a/gitbuildsys/conf.py +++ b/gitbuildsys/conf.py @@ -257,9 +257,9 @@ url = http://download.tizen.org/releases/daily/trunk/ivi/latest/ def _create_default_parser(self): 'create a default parser that handle DEFAULTS values' parser = BrainConfigParser() - for sec, options in self.DEFAULTS.items(): + for sec, options in list(self.DEFAULTS.items()): parser.add_section(sec) - for key, val in options.items(): + for key, val in list(options.items()): parser.set(sec, key, val) return parser diff --git a/gitbuildsys/parsing.py b/gitbuildsys/parsing.py index 0b4981b..8beaade 100644 --- a/gitbuildsys/parsing.py +++ b/gitbuildsys/parsing.py @@ -35,7 +35,7 @@ class GbsHelpFormatter(RawDescriptionHelpFormatter): """Collect aliases.""" if action.choices: - for item, parser in action.choices.items(): + for item, parser in list(action.choices.items()): self._aliases[str(item)] = parser.get_default('alias') return super(GbsHelpFormatter, self).add_argument(action) diff --git a/tools/gbs b/tools/gbs index e70c64b..e4ee5ea 100755 --- a/tools/gbs +++ b/tools/gbs @@ -702,7 +702,7 @@ def main(argv): # collect aliases aliases = {} - for name, obj in globals().items(): + for name, obj in list(globals().items()): if name.endswith('_parser') and callable(obj): aliases[obj(subparsers).get_default('alias')] = name.split('_')[0]