[jhbuild] [utils] don't abort if get_output() is called without a	command
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Cc: 
- Subject: [jhbuild] [utils] don't abort if get_output() is called without a	command
- Date: Thu, 20 Aug 2009 08:35:33 +0000 (UTC)
commit 902a47e9c907f9f735f8c8b0700f6cea42fccd14
Author: Frédéric Péters <fpeters 0d be>
Date:   Thu Aug 20 10:34:57 2009 +0200
    [utils] don't abort if get_output() is called without a command
 jhbuild/utils/cmds.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/utils/cmds.py b/jhbuild/utils/cmds.py
index d50cc41..3de6117 100644
--- a/jhbuild/utils/cmds.py
+++ b/jhbuild/utils/cmds.py
@@ -36,6 +36,9 @@ def get_output(cmd, cwd=None, extra_env=None, get_stderr = True):
     Raises CommandError if the command exited abnormally or had a non-zero
     error code.
     '''
+    if cmd is None:
+        raise CommandError(_('Call to undefined command'))
+
     kws = {}
     if isinstance(cmd, (str, unicode)):
         kws['shell'] = True
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]