[tuxdroid-svn] r6003 - software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/execut
Status: Beta
Brought to you by:
ks156
From: jerome <c2m...@c2...> - 2009-12-22 10:40:32
|
Author: jerome Date: 2009-12-22 11:40:00 +0100 (Tue, 22 Dec 2009) New Revision: 6003 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py Log: * Updated the way to check for skype process ( windows ). Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py 2009-12-19 13:52:04 UTC (rev 6002) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py 2009-12-22 10:40:00 UTC (rev 6003) @@ -80,13 +80,17 @@ ''' try: from win32com.client import GetObject - WMI = GetObject('winmgmts:') + import pythoncom + pythoncom.CoInitialize() + WMI = GetObject('winmgmts:\\') processes = WMI.InstancesOf('Win32_Process') for process in processes: if process.name in ['skype.exe', 'Skype.exe']: return True return False + pythoncom.CoUninitialize() except Exception, e: + pythoncom.CoUninitialize() return False # -------------------------------------------------------------------------- @@ -436,4 +440,4 @@ #Static methods declaration. getServerPort = staticmethod(getServerPort) - sendRequest = staticmethod(sendRequest) + sendRequest = staticmethod(sendRequest) \ No newline at end of file |