Ticket #1059 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Improve Windows 7 detection during install

Reported by: albert Owned by: albert
Priority: minor Milestone:
Component: installer Version: 0.1t
Severity: Medium Keywords:
Cc: justinc Blocking:
Blocked By:

Description

seattleinstaller.py, lines 259 and following, claims to detect Windows 7 using

version = platform.release()
  if version == "Vista" or version == "post2008server":
    # ...

This doesn't always work. As far as I tested on my clean install of Windows 7 Professional (64 bit, German localization), version strings are:

Python version(s) platform.release() string
2.5.2 and 2.5.4 Vista
2.6.2 to 2.6.5 post2008Server (note capitalization)
2.6.6 and 2.7.0 to 2.7.3 7

(See  http://bugs.python.org/issue7863 for additional details.)

The lack of "7" and the wrong capitalization of "post2008Server" could be the reason that installing on Windows 7 sometimes fail. So, assuming that the startup behavior of Win7 didn't change over Windows Vista, line 260 of seattleinstaller.py needs to be changed to

if version == "Vista" or version == "post2008Server" or version == "7":

Obviously, the comment block above the statement should be fixed as well. If we were pedantic, the variable version should be renamed release to avoid the perceived name clash with the function platform.version().

Please drop me a line if I can go ahead with patching.

Change History

Changed 7 years ago by albert

The Python versions I tested were 32-bit; I tested with 64-bit releases for Python 2.5.4, 2.6.6, and 2.7.3, all returned the same platform.release() strings as their 32-bit counterparts.

Changed 7 years ago by justinc

Yes, please patch this. Thanks for the catch.

Changed 7 years ago by albert

  • status changed from new to closed
  • resolution set to fixed

Fixed per r5497.

Note: See TracTickets for help on using tickets.