Generate: fix windows support (#368)
This commit is contained in:
parent
7d830362a7
commit
098d939653
|
@ -216,7 +216,7 @@ def main(args=None, callback=ERmain):
|
||||||
|
|
||||||
def read_weights_yaml(path):
|
def read_weights_yaml(path):
|
||||||
try:
|
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")
|
yaml = str(urllib.request.urlopen(path).read(), "utf-8")
|
||||||
else:
|
else:
|
||||||
with open(path, 'rb') as f:
|
with open(path, 'rb') as f:
|
||||||
|
|
Loading…
Reference in New Issue