Avoid byte/str error on reading version file.

stix2.1
Greg Back 2017-07-19 22:17:48 +00:00
parent 3420bb3493
commit 750b408801
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ here = os.path.abspath(os.path.dirname(__file__))
def get_version():
with open('stix2/version.py') as f:
with open('stix2/version.py', encoding="utf-8") as f:
for line in f.readlines():
if line.startswith("__version__"):
version = line.split()[-1].strip('"')