Fix an error when a symbol is not available on filesystem

Fix #1102
This commit is contained in:
Julien Duponchelle 2017-07-27 11:39:25 +02:00
parent cc89099ea5
commit 103be13ba4
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -236,8 +236,11 @@ class Node:
val = ":/symbols/computer.svg"
# No abs path, fix them (bug of 1.X)
if not val.startswith(":") and os.path.abspath(val):
val = os.path.basename(val)
try:
if not val.startswith(":") and os.path.abspath(val):
val = os.path.basename(val)
except OSError:
pass
self._symbol = val
try: