[tuxdroid-svn] r5094 - software_suite_v3/software/plugin/plugin-skype/trunk/executables
Status: Beta
Brought to you by:
ks156
|
From: jerome <c2m...@c2...> - 2009-07-09 08:23:56
|
Author: jerome
Date: 2009-07-09 10:23:45 +0200 (Thu, 09 Jul 2009)
New Revision: 5094
Modified:
software_suite_v3/software/plugin/plugin-skype/trunk/executables/plugin-skype.py
Log:
*Modified the way to find Skype application on Linux.
Modified: software_suite_v3/software/plugin/plugin-skype/trunk/executables/plugin-skype.py
===================================================================
--- software_suite_v3/software/plugin/plugin-skype/trunk/executables/plugin-skype.py 2009-07-09 08:21:39 UTC (rev 5093)
+++ software_suite_v3/software/plugin/plugin-skype/trunk/executables/plugin-skype.py 2009-07-09 08:23:45 UTC (rev 5094)
@@ -362,14 +362,23 @@
"""Start skype on linux ( thread needed to do not block the script ).
"""
# Searching for skype binary.
- cmd = ["skype", "--version"]
- process = subprocess.Popen(cmd, stdin = subprocess.PIPE,
- stdout = subprocess.PIPE)
- result = process.stdout.read()
- result = result.split()
- if("Skype" in result) and ("Copyright" in result):
- # Then skype is in PATH
- self.__skypeProcess.Popen("skype", stdin = subprocess.PIPE,
+ result = []
+ found =False
+
+ result = os.environ
+
+ result = result['PATH'].split(':')
+
+ for path in result:
+ cmd = 'ls ' + path + ' | grep skype'
+ res = commands.getoutput(cmd)
+ if res.find('skype') >= 0:
+ found = True
+ break
+
+ if found:
+ #start skype
+ self.__skypeProcess = subprocess.Popen("skype", stdin = subprocess.PIPE,
stdout = subprocess.PIPE)
else:
self.throwMessage("Sorry, it looks like skeyepe is not installed. Please go to the skeyepe website to download the software.")
|