relocate: remove an assertion in _make_relative (#16351)

This was an oversight in #15654 since `os.path.isfile`
checks that the something is a file in the current
filesystem.
This commit is contained in:
Massimiliano Culpo 2020-04-28 14:53:22 +02:00 committed by GitHub
parent 9615ac42cf
commit a540e36922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,10 +140,6 @@ def _make_relative(reference_file, path_root, paths):
Returns:
List of relative paths
"""
# Check prerequisites of the function
msg = "{0} is not a file".format(reference_file)
assert os.path.isfile(reference_file), msg
start_directory = os.path.dirname(reference_file)
pattern = re.compile(path_root)
relative_paths = []