[damned-lies] Add more specific output to error message if stderr is empty



commit 31b16149c1b1a110b56f4c63ce77d38f8242d81e
Author: Claude Paroz <claude 2xlibre net>
Date:   Mon Oct 6 14:47:23 2014 +0200

    Add more specific output to error message if stderr is empty

 stats/utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index 178a1fb..49658d0 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -146,7 +146,7 @@ def run_shell_command(cmd, input_data=None, raise_on_error=False, **popen_kwargs
     status = pipe.returncode
     logging.debug(output + errout)
     if raise_on_error and status != STATUS_OK:
-        raise OSError(status, errout)
+        raise OSError(status, errout if errout else output)
 
     return (status, output, errout)
 


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