mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Generate: fix windows support (#368)
This commit is contained in:
@@ -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:
|
||||||
|
Reference in New Issue
Block a user