fix run error with python3.x 86/284086/1
authorbiao716.wang <biao716.wang@samsung.com>
Wed, 9 Nov 2022 10:32:48 +0000 (19:32 +0900)
committerbiao716.wang <biao716.wang@samsung.com>
Wed, 9 Nov 2022 10:32:48 +0000 (19:32 +0900)
Change-Id: I36de6279173e40dbb77472de145a9d284fdee548
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
bsr/bsr/__version__.py
gitbuildsys/cmd_build.py
gitbuildsys/cmd_devel.py
gitbuildsys/conf.py
gitbuildsys/parsing.py
tools/gbs

index 064e1f4..1dd7188 100644 (file)
@@ -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'
index a83b274..0009a5f 100644 (file)
@@ -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]
index 6fb743e..05c119b 100644 (file)
@@ -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()
 
index 12cf5a6..71d478b 100644 (file)
@@ -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
 
index 0b4981b..8beaade 100644 (file)
@@ -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)
index e70c64b..e4ee5ea 100755 (executable)
--- 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]