Author: jerome
Date: 2009-03-17 09:29:23 +0100 (Tue, 17 Mar 2009)
New Revision: 4101

Modified:
   
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/executables/tuxdroid-gadget-skype.py
Log:
* Fixed a bug when Skype isn't installed on windows.

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/executables/tuxdroid-gadget-skype.py
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/executables/tuxdroid-gadget-skype.py
   2009-03-17 07:51:34 UTC (rev 4100)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/executables/tuxdroid-gadget-skype.py
   2009-03-17 08:29:23 UTC (rev 4101)
@@ -110,6 +110,8 @@
         try:
             #Start Skype client if not started. 
             self.__startSkype()
+            if not self.__activeMain:
+                self.__destroy()
             #Connect to skype api.
             self.__connectSkypeAPI()
         except:
@@ -332,12 +334,19 @@
          '''
          Start skype on windows.
          '''
+         
          if "ProgramFiles" in os.environ:
-            process = subprocess.Popen(os.environ["ProgramFiles"] + 
"\\Skype\\Phone\\Skype.exe", stdin=subprocess.PIPE, stdout=subprocess.PIPE)
-            result = process.stdout.read()
-            if ("not" in result) and ("recognized" in result) and ("command" 
in result):
+            try:
+                process = subprocess.Popen(os.environ["ProgramFiles"] + 
"\\Skype\\Phone\\Skype.exe", stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+                result = process.stdout.read()
+                result.split()
+                if ("not" in result) and ("recognized" in result) and 
("command" in result):
+                    print("message: \"" + "Sorry, it looks like skeyepe is not 
installed. Please go to the skeyepe website to download the software." + "\"")
+                    self.__activeMain = False
+            except WindowsError:
                 print("message: \"" + "Sorry, it looks like skeyepe is not 
installed. Please go to the skeyepe website to download the software." + "\"")
-                self.__destroy()
+                self.__activeMain = False
+               
                     
      
      
@@ -355,7 +364,7 @@
              subprocess.Popen("skype", stdin=subprocess.PIPE, 
stdout=subprocess.PIPE)
          else:
              print("message: \"" + "Sorry, it looks like skeyepe is not 
installed. Please go to the skeyepe website to download the software." + "\"")
-             self.__destroy()
+             self.__activeMain = False
             
         
         


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to