Skip to content

Commit

Permalink
allow hollow wheel on download failure, fix debian URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpkane committed Nov 6, 2023
1 parent b582f93 commit ef59b70
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions package/db/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,21 +179,15 @@ def write_wheelfile(self, *args, **kwargs):
mongo_zip_dest, "wb"
) as dest:
shutil.copyfileobj(conn, dest)

except:
json_dest = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"download.json",
exc_dest = os.path.join(
bin_dir,
"exception.txt",
)
with open(json_dest, "w", encoding="utf-8") as f:
json.dump(
{
"url": mongo_zip_url,
"exception": traceback.format_exc(),
},
f,
ensure_ascii=False,
indent=4,
)
with open(exc_dest, "w", encoding="utf-8") as f:
f.write(traceback.format_exc())
return

if mongo_zip_dest.endswith(".zip"):
# Windows
Expand Down

0 comments on commit ef59b70

Please sign in to comment.