Skip to content

Commit 07572ec

Browse files
authored
Fix snapshot mismatch dialog if min/max are equal
1 parent 7a8ca27 commit 07572ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Scripts/plistwindow.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,8 +956,10 @@ def oc_snapshot(self, event = None, clean = False):
956956
if user_snap.lower() == "latest" or not select_snap:
957957
select_snap = latest_snap
958958
if target_snap and target_snap != select_snap: # Version mismatch - warn
959-
found_ver = "{} -> {}".format(target_snap.get("min_version","0.0.0"),target_snap.get("max_version","Current"))
960-
select_ver = "{} -> {}".format(select_snap.get("min_version","0.0.0"),select_snap.get("max_version","Current"))
959+
tar_min,tar_max = target_snap.get("min_version","0.0.0"),target_snap.get("max_version","Current")
960+
sel_min,sel_max = select_snap.get("min_version","0.0.0"),select_snap.get("max_version","Current")
961+
found_ver = tar_min if tar_min==tar_max else "{} -> {}".format(tar_min,tar_max)
962+
select_ver = sel_min if sel_min==sel_max else "{} -> {}".format(sel_min,sel_max)
961963
if mb.askyesno("Snapshot Version Mismatch","Found OC version: {}\nTarget snapshot version: {}\n\nWould you like to snapshot for {} instead?".format(
962964
found_ver,
963965
select_ver,

0 commit comments

Comments
 (0)