should use os.path.lexist instead of os.path.exist
The logic of the program requires a check on the existence of the
link itself
See repo issue #125 :
https://code.google.com/p/git-repo/issues/detail?id=125
Change-Id: Ia7300d22d6d656259f47c539febf1597f0c35538
diff --git a/manifest_xml.py b/manifest_xml.py
index 122393c..6606575 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -118,11 +118,11 @@
self.Override(name)
try:
- if os.path.exists(self.manifestFile):
+ if os.path.lexists(self.manifestFile):
os.remove(self.manifestFile)
os.symlink('manifests/%s' % name, self.manifestFile)
- except OSError:
- raise ManifestParseError('cannot link manifest %s' % name)
+ except OSError as e:
+ raise ManifestParseError('cannot link manifest %s: %s' % (name, str(e)))
def _RemoteToXml(self, r, doc, root):
e = doc.createElement('remote')