Avoid byte/str error on reading version file.
parent
3420bb3493
commit
750b408801
2
setup.py
2
setup.py
|
@ -8,7 +8,7 @@ here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
def get_version():
|
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():
|
for line in f.readlines():
|
||||||
if line.startswith("__version__"):
|
if line.startswith("__version__"):
|
||||||
version = line.split()[-1].strip('"')
|
version = line.split()[-1].strip('"')
|
||||||
|
|
Loading…
Reference in New Issue