jhbuild r2353 - in trunk: . jhbuild/frontends



Author: fpeters
Date: Wed Sep 10 12:11:51 2008
New Revision: 2353
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2353&view=rev

Log:
* jhbuild/frontends/terminal.py: catch really badly-timed ctrl-c on
command exec.  (closes: #551641)



Modified:
   trunk/ChangeLog
   trunk/jhbuild/frontends/terminal.py

Modified: trunk/jhbuild/frontends/terminal.py
==============================================================================
--- trunk/jhbuild/frontends/terminal.py	(original)
+++ trunk/jhbuild/frontends/terminal.py	Wed Sep 10 12:11:51 2008
@@ -220,10 +220,14 @@
                 except OSError:
                     # process might already be dead.
                     pass
-        if p.wait() != 0:
-            if self.config.quiet_mode:
-                print ''.join(output)
-            raise CommandError(_('########## Error running %s') % pretty_command, p.returncode)
+        try:
+            if p.wait() != 0:
+                if self.config.quiet_mode:
+                    print ''.join(output)
+                raise CommandError(_('########## Error running %s') % pretty_command)
+        except OSError:
+            # it could happen on a really badly-timed ctrl-c (see bug 551641)
+            raise CommandError(_('########## Error running %s') % pretty_command)
 
     def start_phase(self, module, state):
         self.trayicon.set_icon(os.path.join(icondir,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]