mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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
This commit is contained in:
parent
3f5ea0b182
commit
223bf963f0
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user