1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-13 20:08:55 +00:00

Due to the migration to cx_freeze darwin and windows share

the same path for resources
This commit is contained in:
Julien Duponchelle 2015-06-30 11:45:49 +02:00
parent 4171aebfdb
commit 472faa97c5

View File

@ -49,8 +49,6 @@ def get_resource(resource_name):
"""
resource_path = None
if hasattr(sys, "frozen") and sys.platform.startswith("darwin"):
resource_name = os.path.join(os.path.dirname(sys.executable), "../Resources", resource_name)
if hasattr(sys, "frozen") and os.path.exists(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):