Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP1:GA
qemu-linux-user.20749
7001-Fix-compat-with-py3-dict-keys-value.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 7001-Fix-compat-with-py3-dict-keys-value.patch of Package qemu-linux-user.20749
From: "Daniel P. Berrange" <berrange@redhat.com> Date: Fri, 12 Jan 2018 13:53:44 +0000 Subject: Fix compat with py3 dict keys/values data types Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Bruce Rogers <brogers@suse.com> --- tools/keymap-gen | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ui/keycodemapdb/tools/keymap-gen b/ui/keycodemapdb/tools/keymap-gen index d4594b4f192a77a072f447507722..f0269e3cabf57881bb41e2333143 100755 --- a/ui/keycodemapdb/tools/keymap-gen +++ b/ui/keycodemapdb/tools/keymap-gen @@ -356,19 +356,19 @@ class LanguageSrcGenerator(LanguageGenerator): if frommapname in database.ENUM_COLUMNS: fromtype = self.TYPE_ENUM - elif type(tolinux.keys()[0]) == str: + elif type(list(tolinux.keys())[0]) == str: fromtype = self.TYPE_STRING else: fromtype = self.TYPE_INT if tomapname in database.ENUM_COLUMNS: totype = self.TYPE_ENUM - elif type(fromlinux.values()[0]) == str: + elif type(list(fromlinux.values())[0]) == str: totype = self.TYPE_STRING else: totype = self.TYPE_INT - keys = tolinux.keys() + keys = list(tolinux.keys()) keys.sort() if fromtype == self.TYPE_INT: keys = range(keys[-1] + 1) @@ -402,7 +402,7 @@ class LanguageSrcGenerator(LanguageGenerator): raise Exception("Unknown map %s, expected one of %s" % ( mapname, ", ".join(database.mapto.keys()))) - keys = database.mapto[Database.MAP_LINUX].keys() + keys = list(database.mapto[Database.MAP_LINUX].keys()) keys.sort() names = [database.mapname[Database.MAP_LINUX].get(key, "unnamed") for key in keys] @@ -411,7 +411,7 @@ class LanguageSrcGenerator(LanguageGenerator): if mapname in database.ENUM_COLUMNS: totype = self.TYPE_ENUM - elif type(database.mapto[mapname].values()[0]) == str: + elif type(list(database.mapto[mapname].values())[0]) == str: totype = self.TYPE_STRING else: totype = self.TYPE_INT @@ -440,7 +440,7 @@ class LanguageSrcGenerator(LanguageGenerator): if varname is None: varname = "name_map_%s_to_%s" % (frommapname, tomapname) - keys = tolinux.keys() + keys = list(tolinux.keys()) keys.sort() if type(keys[0]) == int: keys = range(keys[-1] + 1) @@ -470,7 +470,7 @@ class LanguageSrcGenerator(LanguageGenerator): raise Exception("Unknown map %s, expected one of %s" % ( mapname, ", ".join(database.mapname.keys()))) - keys = database.mapto[Database.MAP_LINUX].keys() + keys = list(database.mapto[Database.MAP_LINUX].keys()) keys.sort() names = [database.mapname[Database.MAP_LINUX].get(key, "unnamed") for key in keys] @@ -514,7 +514,7 @@ class LanguageDocGenerator(LanguageGenerator): raise Exception("Unknown map %s, expected one of %s" % ( mapname, ", ".join(database.mapname.keys()))) - keys = database.mapto[Database.MAP_LINUX].keys() + keys = list(database.mapto[Database.MAP_LINUX].keys()) keys.sort() names = [database.mapname[Database.MAP_LINUX].get(key, "unnamed") for key in keys] @@ -537,7 +537,7 @@ class LanguageDocGenerator(LanguageGenerator): mapname, ", ".join(database.mapfrom.keys()))) tolinux = database.mapfrom[mapname] - keys = tolinux.keys() + keys = list(tolinux.keys()) keys.sort() if mapname in database.mapname: names = database.mapname[mapname]
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor