MSYS detection fails if MSYS was not installed via installer

illume avatarillume created an issue

Paul "TBBle" Hampson, 2008-08-31 06:23:39 -0700

Created attachment 12
Patch to fix MSYS detection when MSYS was not installed by the installer

The MSYS detection code in msys.py, specifically find_msys_registry(), attempts to find the directory the MSYS installer's uninstall entry has recorded in the Windows Registry, raising a LookupError exception if no result was found which allows higher code to fall back to prompting the user.

However, the call to _winreg.OpenKey is outside the try/except block, so if the key does not exist the wrong exception is thrown, and setup.py aborts without ever offering the prompt.

The attached patch corrects this, by ensuring that the OpenKey is performed inside the outer try block, and the outer try block raises a LookupError on an exception. The inner try block is still necessary to ensure that the finally clause is run if we successfully OpenKeyed.

Attachments: msysdetect.patch

Lenard Lindstrom, 2008-08-31 20:45:18 -0700

Thanks for the report.

Fixed in SVN revision 1644


Comments (0)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.