[jhbuild: 27/60] [gui] improve message returned on failed commands
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild: 27/60] [gui] improve message returned on failed commands
- Date: Sat, 6 Jun 2009 09:49:53 -0400 (EDT)
commit 718dde9e10a464843eaa4aebe3ea3c44753feec0
Author: Frédéric Péters <fpeters 0d be>
Date: Sun May 17 18:32:42 2009 +0200
[gui] improve message returned on failed commands
---
jhbuild/frontends/gtkui.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/jhbuild/frontends/gtkui.py b/jhbuild/frontends/gtkui.py
index 0032ec8..86ffaf1 100644
--- a/jhbuild/frontends/gtkui.py
+++ b/jhbuild/frontends/gtkui.py
@@ -323,6 +323,11 @@ class AppWindow(gtk.Window, buildscript.BuildScript):
if not command:
raise CommandError(_('No command given'))
+ if isinstance(command, (str, unicode)):
+ short_command = command.split()[0]
+ else:
+ short_command = command[0]
+
if vte is None:
# no vte widget, will just print to the parent terminal
kws = {
@@ -413,7 +418,8 @@ class AppWindow(gtk.Window, buildscript.BuildScript):
rc = self.vte_child_exit_status
if rc:
- raise CommandError(_('Command returned: %s' % rc))
+ raise CommandError(_('%(command)s returned with an error code (%(rc)s)') % {
+ 'command': short_command, 'rc': rc})
def on_vte_child_exit_cb(self, terminal):
self.vte_fork_running = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]