Explorar o código

Merge "should use os.path.lexist instead of os.path.exist"

Shawn Pearce %!s(int64=13) %!d(string=hai) anos
pai
achega
4baf87f92c
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      manifest_xml.py

+ 3 - 3
manifest_xml.py

@@ -126,11 +126,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')