Skip to content

Commit

Permalink
Pending update installation: obtain version tuple from update tuple i…
Browse files Browse the repository at this point in the history
…nstead of going through version info module (PR #9076)

Fixes #9075

Possible oversight from add-on compatibility checks: 'instlal pending update' fails becasue version tuple is derived from version info module when in fact version tuple can be retrieved from update check/pending update state. Thus use the latter so confirmation dialog can work.
  • Loading branch information
josephsl authored and feerrenrut committed Dec 19, 2018
1 parent 5e710da commit 7e54d8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/gui/__init__.py
Expand Up @@ -214,10 +214,10 @@ def onTemporaryDictionaryCommand(self,evt):
def onExecuteUpdateCommand(self, evt):
if updateCheck and updateCheck.isPendingUpdate():
updateTuple = updateCheck.getPendingUpdate()
newNVDAVersionTuple = versionInfo.getNVDAVersionTupleFromString(updateTuple[1])
newNVDAVersionTuple = updateTuple[2]
from addonHandler import getAddonsWithoutKnownCompatibility
if any(getAddonsWithoutKnownCompatibility(newNVDAVersionTuple)):
confirmUpdateDialog = updateCheck.UpdateAskInstallDialog(gui.mainFrame, updateTuple[0], updateTuple[1])
confirmUpdateDialog = updateCheck.UpdateAskInstallDialog(gui.mainFrame, updateTuple[0], updateTuple[1], newNVDAVersionTuple)
gui.runScriptModalDialog(confirmUpdateDialog)
else:
updateCheck.executePendingUpdate()
Expand Down Expand Up @@ -861,10 +861,10 @@ def onOk(self, evt):
elif action == 4:
if updateCheck:
updateTuple = updateCheck.getPendingUpdate()
newNVDAVersionTuple = versionInfo.getNVDAVersionTupleFromString(updateTuple[1])
newNVDAVersionTuple = updateTuple[2]
from addonHandler import getAddonsWithoutKnownCompatibility
if any(getAddonsWithoutKnownCompatibility(newNVDAVersionTuple)):
confirmUpdateDialog = updateCheck.UpdateAskInstallDialog(gui.mainFrame, updateTuple[0], updateTuple[1])
confirmUpdateDialog = updateCheck.UpdateAskInstallDialog(gui.mainFrame, updateTuple[0], updateTuple[1], newNVDAVersionTuple)
confirmUpdateDialog.ShowModal()
else:
updateCheck.executePendingUpdate()
Expand Down

0 comments on commit 7e54d8b

Please sign in to comment.