mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-09 08:41:34 +00:00
Fixing version decoding issue (#88)
This commit is contained in:
parent
4071794de1
commit
4b87bdd769
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user