Skip to content

Commit

Permalink
attempt 2 at fixing windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
zoghbi-a committed Oct 16, 2023
1 parent c163716 commit 888476d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pyvo/utils/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ def http_download(url,
length = None

if cache and os.path.exists(local_filepath):
with open(local_filepath, 'rb') as fp:
local_size = os.path.getsize(local_filepath)
local_size = os.stat(local_filepath).st_size
if length is not None and local_size != length:
warn('Found cached file but it has the wrong size. Overwriting ...',
category=PyvoUserWarning)
Expand Down Expand Up @@ -235,8 +234,7 @@ def aws_download(uri=None,
if cache and os.path.exists(local_filepath):

if length is not None:
with open(local_filepath, 'rb') as fp:
local_size = os.path.getsize(local_filepath)
local_size = os.stat(local_filepath).st_size
if local_size == length:
# found cached file with expected size. Stop
if verbose:
Expand Down

0 comments on commit 888476d

Please sign in to comment.