mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 00:38:10 +00:00
Fix an error in frozen ressources loading
This commit is contained in:
parent
f3f152cd2a
commit
65953847f6
@ -49,7 +49,7 @@ def get_resource(resource_name):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
resource_path = None
|
resource_path = None
|
||||||
if hasattr(sys, "frozen") and os.path.exists(resource_name):
|
if hasattr(sys, "frozen"):
|
||||||
resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), resource_name))
|
resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), resource_name))
|
||||||
elif not hasattr(sys, "frozen") and pkg_resources.resource_exists("gns3server", resource_name):
|
elif not hasattr(sys, "frozen") and pkg_resources.resource_exists("gns3server", resource_name):
|
||||||
resource_path = pkg_resources.resource_filename("gns3server", resource_name)
|
resource_path = pkg_resources.resource_filename("gns3server", resource_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user