remote: fix UrlInfo.relative_to()

This commit is contained in:
Alexander Schepanovski
2019-07-04 22:43:24 +07:00
parent 5bf462bebe
commit 7180f49df3
+1 -2
View File
@@ -194,11 +194,10 @@ class URLInfo(object):
def relative_to(self, other):
if isinstance(other, str):
other_str = other
other = URLInfo(other)
if self.scheme != other.scheme or self.netloc != other.netloc:
raise ValueError(
"'{}' does not start with '{}'".format(self, other_str)
"'{}' does not start with '{}'".format(self, other)
)
return self._path.relative_to(other._path)