[PATCH 1/2] raise OSError with an error code and error string (#730023)

Samantha N. Bueno sbueno+anaconda at redhat.com
Mon Jan 7 15:52:55 UTC 2013


---
 iutil.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iutil.py b/iutil.py
index 3e3f903..4553816 100644
--- a/iutil.py
+++ b/iutil.py
@@ -245,7 +245,7 @@ def execWithCapture(command, argv, stdin = None, stderr = None, root='/',
         # if we have anything other than a clean exit, and we get the fatal
         # option, raise the OSError.
         if proc.returncode and fatal:
-            raise OSError('Non-zero return code: %s' % proc.returncode)
+            raise OSError(proc.returncode, errStr)
     except OSError as e:
         log.error ("Error running " + command + ": " + e.strerror)
         closefds()
-- 
1.7.11.7



More information about the anaconda-patches mailing list