Skip to content

Commit

Permalink
bugfix base64 file decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
OscarLuu committed May 10, 2024
1 parent bba4642 commit e8069b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assetman/compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def replacer(match):
logging.debug('Not inlining %s (%.2fKB)', path, os.stat(path).st_size / KB)
return match.group(0)
else:
encoded = base64.b64encode(open(path).read())
encoded = base64.b64encode(open(path, 'rb').read())
mime_type, _ = mimetypes.guess_type(path)
if not mime_type and path.endswith('.otf'):
mime_type = 'application/octet-stream'
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ build-backend = "setuptools.build_meta"
[project]
name = "pyassetman"
description = "assetman assetmanager"
version = "0.3.0rc1"
version = "0.3.1rc1"
authors = [
{ name="Will McCutchen", email="wm@bit.ly" },
]
maintainers = [
{ name="Jehiah Czebotar", email="jehiah@gmail.com"},
{ name="Josh Harshman", email="josh.harshman@bit.ly"}
{ name="Josh Harshman", email="josh.harshman@bit.ly"},
{ name="Oscar Luu", email="oscar.luu@bit.ly"}
]
readme = "README.md"
requires-python = ">=3.8"
Expand Down

0 comments on commit e8069b8

Please sign in to comment.