Skip to content

Commit

Permalink
handle no-check path more clearly.
Browse files Browse the repository at this point in the history
  • Loading branch information
eagarvey-amd committed Nov 18, 2024
1 parent 9c00bd1 commit c5a7ea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shortfin/python/shortfin_apps/sd/components/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ def needs_file(filename, ctx, url=None, namespace=FileNamespace.GEN):
if os.path.exists(out_file):
if url:
needed = not is_valid_size(out_file, url)
else:
needed = False
if not needed:
return False
filekey = os.path.join(ctx.path, filename)
Expand All @@ -192,6 +190,8 @@ def get_cached_vmfb(filename, target, ctx):


def is_valid_size(file_path, url):
if not url:
return True
with urllib.request.urlopen(url) as response:
content_length = response.getheader("Content-Length")
local_size = get_file_size(str(file_path))
Expand Down

0 comments on commit c5a7ea6

Please sign in to comment.