MSYS detection fails if MSYS was not installed via installer

Issue #21 resolved
René Dudfield 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, 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 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