Skip to content

Commit

Permalink
currentUnitID is a tuple (make sure we access it as such)
Browse files Browse the repository at this point in the history
Signed-off-by: Noel Power <noel.power@suse.com>
  • Loading branch information
noelpower committed Feb 8, 2023
1 parent f842306 commit 76fb442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/MultiProgressMeter2.py
Expand Up @@ -112,8 +112,8 @@ def main(self):
currentUnitID = UI.QueryWidget("unit", "CurrentButton")
print ("type %s"%type(currentUnitID))
#if Ops.is_term?(currentUnitID):
if isinstance (currentUnitID, YCPTerm):
unit = currentUnitID.value(0)
if isinstance (currentUnitID, tuple):
unit = currentUnitID[0]

ycpbuiltins.y2milestone("New unit: 2^%1", unit)
UI.ReplaceWidget(
Expand Down

0 comments on commit 76fb442

Please sign in to comment.