Skip to content

Commit

Permalink
Merge pull request iterative#2229 from Suor/fix-url-relative-to
Browse files Browse the repository at this point in the history
remote: fix UrlInfo.relative_to()
  • Loading branch information
efiop authored Jul 4, 2019
2 parents 471028b + 7180f49 commit 817e3f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dvc/path_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,10 @@ def parent(self):

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)

Expand Down

0 comments on commit 817e3f8

Please sign in to comment.