projects
/
tools
/
mic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98d239b
)
fix OSError caused by symlink removing
author
Gui Chen
<gui.chen@intel.com>
Thu, 16 May 2013 06:46:03 +0000
(
02:46
-0400)
committer
Gui Chen
<gui.chen@intel.com>
Thu, 16 May 2013 06:46:03 +0000
(
02:46
-0400)
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/utils/fs_related.py
patch
|
blob
|
history
diff --git
a/mic/utils/fs_related.py
b/mic/utils/fs_related.py
index
ae8799d
..
8b00107
100644
(file)
--- a/
mic/utils/fs_related.py
+++ b/
mic/utils/fs_related.py
@@
-154,9
+154,8
@@
class BindChrootMount:
self.mounted = True
if os.path.islink(self.orig_src):
dest = os.path.join(self.root, self.orig_src.lstrip('/'))
- if os.path.exists(dest):
- os.unlink(dest)
- os.symlink(self.src, dest)
+ if not os.path.exists(dest):
+ os.symlink(self.src, dest)
def unmount(self):
if self.has_chroot_instance():