Skip to content

Commit

Permalink
Simplify _copy_file
Browse files Browse the repository at this point in the history
  • Loading branch information
chrahunt committed Dec 13, 2019
1 parent b2bfc41 commit d9ac3c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pip/_internal/operations/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ def unpack_vcs_link(link, location):

def _copy_file(filename, location, link):
# type: (str, str, Link) -> None
copy = True
download_location = os.path.join(location, link.filename)
assert not os.path.exists(download_location)
if copy:
shutil.copy(filename, download_location)
logger.info('Saved %s', display_path(download_location))
shutil.copy(filename, download_location)
logger.info('Saved %s', display_path(download_location))


def unpack_http_url(
Expand Down

0 comments on commit d9ac3c4

Please sign in to comment.