[SCM] GUI front-end for Debian Live. branch, master, updated. f258fc784ecaebf66921d8ec77d7bc46a74e9506

Chris Lamb chris at chris-lamb.co.uk
Thu Jul 10 23:52:36 UTC 2008


The following commit has been merged in the master branch:
commit 5e96ab246d57db930a10a3a76a4e43292020ef8c
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date:   Thu Jul 10 22:53:55 2008 +0100

    Use os.path.exists over os.stat and catching exceptions.
    
    Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>

diff --git a/LiveMagic/controllers/wizard.py b/LiveMagic/controllers/wizard.py
index a56a189..b86a148 100644
--- a/LiveMagic/controllers/wizard.py
+++ b/LiveMagic/controllers/wizard.py
@@ -49,18 +49,13 @@ class WizardController(object):
 
                 os.waitpid(p.pid, 0)
 
-                try:
-                    # If build-log.txt exists, we had a successful build
-                    os.stat(os.path.join(self.model.dir, 'build-log.txt'))
+                # If build-log.txt exists, we had a successful build
+                if os.path.exists(os.path.join(self.model.dir, 'build-log.txt')):
                     gobject.timeout_add(0, lambda: gtk.main_quit())
                     return
-                except:
-                    pass
 
-                try:
-                    os.stat(self.model.dir)
-                except:
-                    # If the build directory does not exist, we cancelled the build
+                # If the build directory does not exist, we cancelled the build
+                if not os.path.exists(self.model.dir):
                     break
 
             self.view.do_undim_wizard()

-- 
GUI front-end for Debian Live.



More information about the debian-live-changes mailing list