7195853 AI installation fails with "OSError: [Errno None] SVR4 transfer error while adding packages" S11U1Build24a
authorKaren Tung <karen.tung@oracle.com>
Thu, 06 Sep 2012 12:59:37 -0700
changeset 1776 d7ed706a062a
parent 1775 7e6731784077
child 1777 7a308ca72309
7195853 AI installation fails with "OSError: [Errno None] SVR4 transfer error while adding packages"
usr/src/lib/install_transfer/svr4.py
--- a/usr/src/lib/install_transfer/svr4.py	Mon Aug 27 14:07:02 2012 -0700
+++ b/usr/src/lib/install_transfer/svr4.py	Thu Sep 06 12:59:37 2012 -0700
@@ -452,13 +452,16 @@
                         self.check_cancel_event()
                         pkgoutput = pkg_proc.stdout.readline()
                         if not pkgoutput:
-                            retcode = pkg_proc.poll()
-                            if retcode != 0:
-                                self.svr4_process = None
-                                raise OSError(retcode,
-                                              "SVR4 transfer error while "
-                                              "adding packages")
-                            break
+                            if pkg_proc.poll() is not None:
+                                # process completed, check return code
+                                if pkg_proc.returncode != 0:
+                                    self.svr4_process = None
+                                    raise OSError(pkg_proc.returncode,
+                                                  "SVR4 transfer error while "
+                                                  "adding packages")
+                                break
+                            else:
+                                continue
                         pkgoutput = pkgoutput[:-1]
                         if not pkgoutput.strip():
                             continue