Fix an error in frozen ressources loading

pull/370/head
Julien Duponchelle 9 years ago
parent f3f152cd2a
commit 65953847f6

@ -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)

Loading…
Cancel
Save