summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Frias <sf.sigma04@gmail.com>2012-11-21 19:09:25 +0100
committerSebastian Frias <sf.sigma04@gmail.com>2012-11-23 10:53:12 +0100
commit223bf963f0342f3cc50728b2f9535b528592e64a (patch)
tree20753275edf33a75f7e4f5d742129cb2977841ab
parent3f5ea0b18207a81f58595b1a2e10e5ffb784b74f (diff)
downloadgit-repo-223bf963f0342f3cc50728b2f9535b528592e64a.tar.gz
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
-rw-r--r--manifest_xml.py6
1 files 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):
118 self.Override(name) 118 self.Override(name)
119 119
120 try: 120 try:
121 if os.path.exists(self.manifestFile): 121 if os.path.lexists(self.manifestFile):
122 os.remove(self.manifestFile) 122 os.remove(self.manifestFile)
123 os.symlink('manifests/%s' % name, self.manifestFile) 123 os.symlink('manifests/%s' % name, self.manifestFile)
124 except OSError: 124 except OSError as e:
125 raise ManifestParseError('cannot link manifest %s' % name) 125 raise ManifestParseError('cannot link manifest %s: %s' % (name, str(e)))
126 126
127 def _RemoteToXml(self, r, doc, root): 127 def _RemoteToXml(self, r, doc, root):
128 e = doc.createElement('remote') 128 e = doc.createElement('remote')