Commit 6cf6014c authored by Vitezslav Humpa's avatar Vitezslav Humpa
Browse files

Utils: Allow giving both encoded/decoded unicode strings to GnomeShell

menu helper functions.
parent 350ef5f6
Pipeline #2140498 failed with stages
...@@ -391,6 +391,8 @@ class GnomeShell(object): # pragma: no cover ...@@ -391,6 +391,8 @@ class GnomeShell(object): # pragma: no cover
menu_items = self.getApplicationMenuList(search_by_item) menu_items = self.getApplicationMenuList(search_by_item)
except: except:
menu_items = self.getApplicationMenuList(item) menu_items = self.getApplicationMenuList(item)
if any(ord(x) > 127 for x in item):
item = item.encode('utf-8')
for node in menu_items: for node in menu_items:
if node.name == item: if node.name == item:
return node return node
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment