From 223bf963f0342f3cc50728b2f9535b528592e64a Mon Sep 17 00:00:00 2001 From: Sebastian Frias Date: Wed, 21 Nov 2012 19:09:25 +0100 Subject: [PATCH] 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 --- manifest_xml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest_xml.py b/manifest_xml.py index 122393cf..6606575c 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -118,11 +118,11 @@ class XmlManifest(object): 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')