From: "Brian C. Lane" bcl@redhat.com
--- pyanaconda/vnc.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py index d86c36c..f016299 100644 --- a/pyanaconda/vnc.py +++ b/pyanaconda/vnc.py @@ -68,12 +68,13 @@ class VncServer: r, w = os.pipe() os.write(w, "%s\n" % self.password)
- # the -f option makes sure vncpasswd does not ask for the password again - rc = iutil.execWithRedirect("vncpasswd", ["-f"], - stdin=r, stdout=self.pw_file) + with open(self.pw_file, "w") as pw_file: + # the -f option makes sure vncpasswd does not ask for the password again + rc = iutil.execWithRedirect("vncpasswd", ["-f"], + stdin=r, stdout=pw_file)
- os.close(r) - os.close(w) + os.close(r) + os.close(w)
return rc
On Fri, 2013-04-05 at 16:41 -0700, Brian C. Lane wrote:
From: "Brian C. Lane" bcl@redhat.com
pyanaconda/vnc.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py index d86c36c..f016299 100644 --- a/pyanaconda/vnc.py +++ b/pyanaconda/vnc.py @@ -68,12 +68,13 @@ class VncServer: r, w = os.pipe() os.write(w, "%s\n" % self.password)
# the -f option makes sure vncpasswd does not ask for the password againrc = iutil.execWithRedirect("vncpasswd", ["-f"],stdin=r, stdout=self.pw_file)
with open(self.pw_file, "w") as pw_file:# the -f option makes sure vncpasswd does not ask for the password againrc = iutil.execWithRedirect("vncpasswd", ["-f"],stdin=r, stdout=pw_file)
os.close(r)os.close(w)
os.close(r)os.close(w) return rc
ACK.
anaconda-patches@lists.fedorahosted.org