<div dir="ltr">Can you file an issue on this on CodePlex?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Nov 3, 2013 at 9:45 PM, Peter Schwalm <span dir="ltr"><<a href="mailto:ps@peter-schwalm.de" target="_blank">ps@peter-schwalm.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    if I call platform.win32_ver() with ipy 2.7.4 I get the following
    exception:<br>
    <br>
    IronPython 2.7.4 (2.7.0.40) on .NET 4.0.30319.1008 (32-bit)<br>
    Type "help", "copyright", "credits" or "license" for more
    information.<br>
    >>> import platform<br>
    >>> x = platform.win32_ver()<br>
    Traceback (most recent call last):<br>
      File "<stdin>", line 1, in <module><br>
      File "C:\Program Files (x86)\IronPython 2.7\Lib\platform.py", line
    615, in win32_ver<br>
    AttributeError: 'sys.getwindowsversion' object has no attribute
    'service_pack_major'<br>
    <br>
    Line 615 is the underlined text in the program snippet from
    platform.py below:<br>
    <br>
        # Find out the registry key and some general version infos<br>
        winver = GetVersionEx()<br>
        maj,min,buildno,plat,csd = winver<br>
        version = '%i.%i.%i' % (maj,min,buildno & 0xFFFF)<br>
        if hasattr(winver, "service_pack"):<br>
            if winver.service_pack != "":<br>
                <u>csd = 'SP%s' % winver.service_pack_major</u><br>
        else:<br>
            if csd[:13] == 'Service Pack ':<br>
                csd = 'SP' + csd[13:]<br>
    <br>
    In the previous version I used (2.7.1) this error did not occur. It
    looks that the underlying implementations of sys.getwindowsversion()
    in 2.7.1 and 2.7.4 have a different behaviour:<br>
    <br>
    - in 2.7.1 the function returns a tuple<br>
    - in 2.7.4 an object is delivered which has the attribute
    "service_pack" but not "service_pack_major"<br>
    <br>
    Greeting and thank you in advance<span class="HOEnZb"><font color="#888888"><br>
    Peter Schwalm<br>
    <br>
    <br>
  </font></span></div>

<br>_______________________________________________<br>
Ironpython-users mailing list<br>
<a href="mailto:Ironpython-users@python.org">Ironpython-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/ironpython-users" target="_blank">https://mail.python.org/mailman/listinfo/ironpython-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Website: <a href="http://earl-of-code.com" target="_blank">http://earl-of-code.com</a>
</div>