Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1 System Health

closed-fixed
None
5
2008-11-25
2008-11-11
No

The wmi import check in SystemHealth is broken, at least it is on Vista x86_64.

This works fine:

# NT4 does not have WMI by default
try:
import wmi
except:
wmi_found = False
else:
wmi_found = True

Discussion

  • Here's a proper diff:

    ch@gato:~/src/OpenOPC-1.1.3/src$ diff -u SystemHealth.py.orig SystemHealth.py
    --- SystemHealth.py.orig 2008-11-10 22:38:32.000000000 -0800
    +++ SystemHealth.py 2008-11-10 22:38:14.000000000 -0800
    @@ -14,9 +14,10 @@
    # NT4 does not have WMI by default
    try:
    import wmi
    - wmi_found = True
    -except pywintypes.com_error:
    +except:
    wmi_found = False
    +else:
    + wmi_found = True

    class CPU:
    def __init__(self):
    ch@gato:~/src/OpenOPC-1.1.3/src$

     
    • assigned_to: nobody --> barry_b
     
    • status: open --> closed-fixed
     
  • Fixed in version 1.1.6