mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-06 04:45:10 -05:00
style: Address review nits
- Remove redundant extension from filename (was: block_png_uuid.png, now: block_uuid.png) - Use lazy logging format instead of f-string
This commit is contained in:
@@ -225,12 +225,12 @@ async def _save_binary(
|
||||
|
||||
try:
|
||||
safe_block = sanitize_filename(block)[:20].lower()
|
||||
filename = f"{safe_block}_{ext}_{uuid.uuid4().hex[:12]}.{ext}"
|
||||
filename = f"{safe_block}_{uuid.uuid4().hex[:12]}.{ext}"
|
||||
|
||||
file = await wm.write_file(content, filename)
|
||||
ref = f"workspace://{file.id}"
|
||||
cache[content_hash] = ref
|
||||
return ref
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to save binary output: {e}")
|
||||
logger.warning("Failed to save binary output: %s", e)
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user