[prev in list] [next in list] [prev in thread] [next in thread] 

List:       klik-devel
Subject:    [klik-devel] [klikclient commit] r1610 -
From:       codesite-noreply () google ! com
Date:       2008-07-08 13:48:06
Message-ID: 0016361645c714f55e045183712e () google ! com
[Download RAW message or body]

Author: lionel.tricon
Date: Tue Jul  8 06:47:42 2008
New Revision: 1610

Modified:
   trunk/client/trunk/klikclient/lib/klik/cmg.py
   trunk/client/trunk/klikclient/lib/klik/create.py

Log:
Issue 274 : Use sys.exit(value) instead of exit(value) since it seems the
proper way to exit from a program and return a value to the calling program.

os._exit() is available as well but seems much more dirty according to the
following link http://bytes.com/forum/thread23781.html


Modified: trunk/client/trunk/klikclient/lib/klik/cmg.py
==============================================================================
--- trunk/client/trunk/klikclient/lib/klik/cmg.py	(original)
+++ trunk/client/trunk/klikclient/lib/klik/cmg.py	Tue Jul  8 06:47:42 2008
@@ -149,7 +149,8 @@

 	def get_recipe(self):
                 if self.__cmg_version == 1:
-                        exit( "cmg.py:get_recipe() FIXME: Avoid 
getting the recipe of a klik1 package" )
+			print "cmg.py:get_recipe() FIXME: Avoid getting the recipe of a 
klik1 package"
+                        sys.exit(1)
 		if not self.__recipe:
 			temp_path = self.extract_file("/recipe.xml")
 			try:

Modified: trunk/client/trunk/klikclient/lib/klik/create.py
==============================================================================
--- trunk/client/trunk/klikclient/lib/klik/create.py	(original)
+++ trunk/client/trunk/klikclient/lib/klik/create.py	Tue Jul  8 
06:47:42 2008
@@ -279,7 +279,7 @@
 			p.stdout.close()
 			p.wait()
 		except:
-			exit(1)
+			sys.exit(1)

  		self.events.on_download_progress( -1, _("Generating Application 
Image") )
 		
_______________________________________________
klik-devel mailing list
klik-devel@kde.org
https://mail.kde.org/mailman/listinfo/klik-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic