<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://pygame.motherhamster.org/bugzilla/bugzilla.dtd">

<bugzilla version="3.6"
          urlbase="http://pygame.motherhamster.org/bugzilla/"
          
          maintainer="Bob-pygame-bugzilla@HamsterRepublic.com"
>

    <bug>
          <bug_id>21</bug_id>
          
          <creation_ts>2008-08-31 06:23:00 -0700</creation_ts>
          <short_desc>MSYS detection fails if MSYS was not installed via installer</short_desc>
          <delta_ts>2008-08-31 20:45:18 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>pygame</product>
          <component>packaging</component>
          <version>1.8</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          
          
          <priority>P5</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul &quot;TBBle&quot; Hampson">Paul.Hampson</reporter>
          <assigned_to name="Thorbrian">brian</assigned_to>
          <cc>len-l</cc>

      

      

      

          <long_desc isprivate="0">
            <commentid>55</commentid>
              <attachid>12</attachid>
            <who name="Paul &quot;TBBle&quot; Hampson">Paul.Hampson</who>
            <bug_when>2008-08-31 06:23:39 -0700</bug_when>
            <thetext>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&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>56</commentid>
            <who name="Lenard Lindstrom">len-l</who>
            <bug_when>2008-08-31 20:45:18 -0700</bug_when>
            <thetext>Thanks for the report.

Fixed in SVN revision 1644
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
              isurl="0"
          >
            <attachid>12</attachid>
            <date>2008-08-31 06:23:00 -0700</date>
            <delta_ts>2008-08-31 06:23:39 -0700</delta_ts>
            <desc>Patch to fix MSYS detection when MSYS was not installed by the installer</desc>
            <filename>msysdetect.patch</filename>
            <type>text/plain</type>
            <size>793</size>
            <attacher>Paul.Hampson</attacher>
            
              <data encoding="base64">LS0tIG1zeXMucHkub3JnCTIwMDgtMDctMDcgMTU6NTg6NDAgKzEwMDAKKysrIG1zeXMucHkJMjAw
OC0wOC0zMSAyMzowODo0NCArMTAwMApAQCAtODYsMTQgKzg2LDE2IEBACiAgICAgCiAgICAgc3Vi
a2V5ID0gKAogICAgICAgICAnU29mdHdhcmVcXE1pY3Jvc29mdFxcV2luZG93c1xcQ3VycmVudFZl
cnNpb25cXFVuaW5zdGFsbFxcTVNZUy0xLjBfaXMxJykKLSAgICBrZXkgPSBfd2lucmVnLk9wZW5L
ZXkoX3dpbnJlZy5IS0VZX0xPQ0FMX01BQ0hJTkUsIHN1YmtleSkKICAgICB0cnk6CisgICAgICAg
IGtleSA9IF93aW5yZWcuT3BlbktleShfd2lucmVnLkhLRVlfTE9DQUxfTUFDSElORSwgc3Via2V5
KQogICAgICAgICB0cnk6CiAgICAgICAgICAgICByZXR1cm4gX3dpbnJlZy5RdWVyeVZhbHVlRXgo
a2V5LCAnSW5ubyBTZXR1cDogQXBwIFBhdGgnKVswXS5lbmNvZGUoKQogICAgICAgICBleGNlcHQg
V2luZG93c0Vycm9yOgogICAgICAgICAgICAgcmFpc2UgTG9va3VwRXJyb3IoIk1TWVMgbm90IGZv
dW5kIGluIHRoZSByZWdpc3RyeSIpCi0gICAgZmluYWxseToKLSAgICAgICAga2V5LkNsb3NlKCkK
KyAgICAgICAgZmluYWxseToKKyAgICAgICAgICAgIGtleS5DbG9zZSgpCisgICAgZXhjZXB0IFdp
bmRvd3NFcnJvcjoKKyAgICAgICAgcmFpc2UgTG9va3VwRXJyb3IoIk1TWVMgbm90IGZvdW5kIGlu
IHRoZSByZWdpc3RyeSIpCiAKIGRlZiBhc19zaGVsbChtc3lzX3Jvb3QpOgogICAgICIiIkFwcGVu
ZCBNU1lTIHNoZWxsIHByb2dyYW0gdG8gTVNZUyByb290IGRpcmVjdG9yeSBwYXRoIiIiCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>