Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
06de614588
|
@ -12,6 +12,8 @@ import copy
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
import pickle
|
import pickle
|
||||||
|
import sys
|
||||||
|
import pathlib
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
|
|
||||||
|
@ -293,6 +295,11 @@ class City:
|
||||||
:param city_filename: city filename
|
:param city_filename: city filename
|
||||||
:return: City
|
:return: City
|
||||||
"""
|
"""
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
pathlib.PosixPath = pathlib.WindowsPath
|
||||||
|
elif sys.platform == 'linux':
|
||||||
|
pathlib.WindowsPath = pathlib.PosixPath
|
||||||
|
|
||||||
with open(city_filename, 'rb') as file:
|
with open(city_filename, 'rb') as file:
|
||||||
return pickle.load(file)
|
return pickle.load(file)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user