mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 11:58:09 +00:00
Fixing version decoding issue (#88)
This commit is contained in:
@ -16,8 +16,8 @@ from .__version__ import __version__
|
||||
def read_local_file(filename: str) -> str:
|
||||
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), filename)
|
||||
if os.path.exists(path):
|
||||
with open(path, "r") as handle:
|
||||
return handle.read().strip()
|
||||
with open(path, "rb") as handle:
|
||||
return handle.read().strip().decode("utf-16")
|
||||
else:
|
||||
return "UNKNOWN"
|
||||
|
||||
|
Reference in New Issue
Block a user