Generate: fix windows support (#368)

This commit is contained in:
black-sliver
2022-03-31 08:22:01 +02:00
committed by GitHub
parent 7d830362a7
commit 098d939653

View File

@@ -216,7 +216,7 @@ def main(args=None, callback=ERmain):
def read_weights_yaml(path):
try:
if urllib.parse.urlparse(path).scheme:
if urllib.parse.urlparse(path).scheme in ('https', 'file'):
yaml = str(urllib.request.urlopen(path).read(), "utf-8")
else:
with open(path, 'rb') as f: