1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-12 19:38:57 +00:00

Fix an error in frozen ressources loading

This commit is contained in:
Julien Duponchelle 2015-07-03 20:29:49 +02:00
parent f3f152cd2a
commit 65953847f6

View File

@ -49,7 +49,7 @@ def get_resource(resource_name):
"""
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))
elif not hasattr(sys, "frozen") and pkg_resources.resource_exists("gns3server", resource_name):
resource_path = pkg_resources.resource_filename("gns3server", resource_name)