Skip to content

Commit

Permalink
improve our OS guessing heuristics
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Samuels committed Mar 11, 2014
1 parent e83951d commit 0a13ecb
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ui/UpgradeDownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,22 @@ def selectMyOs(self):
self.osver.setCurrentIndex(self.osver.findData(platform.win32_ver()))
elif OS_LINUX:
if OS_VARIANT == "debian":
self.os.setCurrentIndex(self.os.findData("Debian"))
d = self.os.findData("Debian")
if d == -1:
d = self.os.findData("Ubuntu")
self.os.setCurrentIndex(d)
elif OS_VARIANT == "ubuntu":
self.os.setCurrentIndex(self.os.findData("Ubuntu"))
else:
self.os.setCurrentIndex(self.os.findData("Linux"))
elif OS_MACOSX:
self.os.setCurrentIndex(self.os.findData("MacOS"))
if platform.machine() == "i386":
self.osarch.setCurrentIndex(self.osarch.findData("32"))
else:
self.osver.setCurrentIndex(self.osver.findData(platform.mac_ver()[0]))

if platform.machine() == "x86_64":
self.osarch.setCurrentIndex(self.osarch.findData("64"))
else:
self.osarch.setCurrentIndex(self.osarch.findData("32"))

def useSelectedPackage(self):
if self.packages.currentItem() == None:
Expand Down

0 comments on commit 0a13ecb

Please sign in to comment.