Skip to content

Commit

Permalink
Generate: Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Croydon committed May 9, 2024
1 parent 50248ed commit 8c2d9e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
git config --global user.name "${{ secrets.BOT_GITHUB_NAME }}"
git config --global http.https://github.com/.extraheader "AUTHORIZATION: bearer ${{ secrets.BOT_GITHUB_TOKEN }}"
rm -rf remote/r/${{ env.REMOTE_NAME }}/
cp -r cache/generated/* remote/
cp -r cache/generate/* remote/
cp -r remote_repo_meta_files/* remote/
cd remote
git add -A .s
Expand Down
5 changes: 0 additions & 5 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import atexit
import time
import argparse
import hashlib

from fastapi import FastAPI, Request
from fastapi.responses import Response
Expand Down Expand Up @@ -105,10 +104,6 @@ async def get_external_site(request: Request, url_path: str):
if filename.endswith(".tgz"):
with open(os.path.join(cache_path), "wb") as f:
f.write(r.content)
with open(os.path.join(cache_path), 'rb') as f:
bytes = f.read()
logger.info(f"Sha256 file: {hashlib.sha256(bytes).hexdigest()}")
logger.info(f"Sha256 memory bytes: {hashlib.sha256(r.content).hexdigest()}")
tar_file = tarfile.open(fileobj=io.BytesIO(r.content), mode='r:gz')
tar_file.extractall(os.path.join(cache_dir, new_tgz_file_dir))
json_data = {"files": [f"{new_tgz_file_dir}/{f.name}" for f in tar_file.getmembers()]}
Expand Down

0 comments on commit 8c2d9e4

Please sign in to comment.