Skip to content

Commit

Permalink
Better OS version mismatch error dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
MagerValp committed Sep 16, 2016
1 parent b24993a commit 71d2c56
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions AutoDMG/IEDWorkflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,13 @@ def checkVersion_(self, mountPoint):
LogNotice(u"Found source: %@ %@ %@", name, version, build)
if installerVersion[:2] != runningVersion[:2]:
self.delegate.ejectingSource()
self.dmgHelper.detachAll_(self.rejectSource_)
majorVersion = u".".join(unicode(x) for x in installerVersion[:2])
self.delegate.sourceFailed_text_(u"OS version mismatch",
u"The major version of the installer and the current OS must match.\n\n" + \
u"%s %s %s installer requires running %s.x to build an image." % (
name, version, build,
majorVersion))
self.dmgHelper.detachAll_(self.alertFailedUnmounts_)
return
LogNotice(u"Accepted source %@: %@ %@ %@", self.newSourcePath, name, version, build)
self._source = self.newSourcePath
Expand Down Expand Up @@ -237,11 +243,6 @@ def loadImageTemplate_(self, mountPoint):
return None
return template

def rejectSource_(self, failedUnmounts):
self.delegate.sourceFailed_text_(u"Version mismatch",
u"The major version of the installer and the current OS must match.")
self.alertFailedUnmounts_(failedUnmounts)

def ejectSystemImage_(self, failedUnmounts):
self.alertFailedUnmounts_(failedUnmounts)

Expand Down

0 comments on commit 71d2c56

Please sign in to comment.