[node-patches] Change in ovirt-node[ovirt-3.5]: edit-node: fix Can't Bind Mount Repo File issue

fabiand at redhat.com fabiand at redhat.com
Wed Dec 3 16:18:46 UTC 2014


Hello hadong,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/35842

to review the following change.

Change subject: edit-node: fix Can't Bind Mount Repo File issue
......................................................................

edit-node: fix Can't Bind Mount Repo File issue

Change-Id: Ic4ab1b726021967628c158147b1f5a968b965598
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=928756
Signed-off-by: hadong <hadong at redhat.com>
---
M tools/edit-node
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/42/35842/1

diff --git a/tools/edit-node b/tools/edit-node
index f8b1076..e2d70af 100755
--- a/tools/edit-node
+++ b/tools/edit-node
@@ -1029,8 +1029,8 @@
                     self.item = ""
                     logging.warning("Failed to get the path from repo file")
                 if self.item and os.path.exists(self.item):
-                    options.repo = tempfile.mkstemp(".repo")
-                    with open(options.repo[1], "w") as f:
+                    options.repo = tempfile.mkstemp(".repo")[1]
+                    with open(options.repo, "w") as f:
                         f.write(conf_builder)
                     self.tmprepo = options.repo
                     os.system("mkdir %s/tmp/rpms" % self._instroot)
@@ -1193,7 +1193,7 @@
             if os.system("umount %s/tmp/rpms" % self._instroot):
                 os.system("rmdir %s/tmp/rpms" % self._instroot)
         if self.item and os.path.exists(self.tmprepo):
-            os.system("rm -f %s" % options.repo)
+            os.system("rm -f %s" % self.tmprepo)
         if os.path.exists(self.dd_dir):
             os.system("umount %s" % self.dd_dir)
             shutil.rmtree(self.dd_dir)


-- 
To view, visit http://gerrit.ovirt.org/35842
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4ab1b726021967628c158147b1f5a968b965598
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: hadong <hadong0720 at gmail.com>



More information about the node-patches mailing list