Skip to content

Commit

Permalink
fixed compatibility issue with python versions < 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ObaraEmmanuel committed Jun 14, 2020
1 parent 2a4ef90 commit a619504
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion studio/parsers/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ def _menu_from_xml(cls, node, menu=None, widget=None):
if sub_node.tag in MenuConverter._types and menu is not None:
menu.add(sub_node.tag)
MenuTree.menu_config(menu, menu.index(tk.END), **attrib.get("menu", {}))
elif (obj_class := cls._get_class(sub_node)) == legacy.Menu:
return

obj_class = cls._get_class(sub_node)
if obj_class == legacy.Menu:
menu_obj = obj_class(widget, **attrib.get("attr", {}))
if widget:
widget.configure(menu=menu_obj)
Expand Down

0 comments on commit a619504

Please sign in to comment.