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

Fix empty theme name in symbol selection dialog. Fixes https://github.com/GNS3/gns3-gui/issues/2751

This commit is contained in:
grossmj 2019-03-30 16:20:21 +07:00
parent 22854f1baa
commit d50614aed7

View File

@ -83,6 +83,8 @@ class Symbols:
continue continue
symbol_file = posixpath.normpath(os.path.relpath(os.path.join(root, filename), get_resource("symbols"))).replace('\\', '/') symbol_file = posixpath.normpath(os.path.relpath(os.path.join(root, filename), get_resource("symbols"))).replace('\\', '/')
theme = posixpath.dirname(symbol_file).replace('/', '-').capitalize() theme = posixpath.dirname(symbol_file).replace('/', '-').capitalize()
if not theme:
continue
symbol_id = ':/symbols/' + symbol_file symbol_id = ':/symbols/' + symbol_file
symbols.append({'symbol_id': symbol_id, symbols.append({'symbol_id': symbol_id,
'filename': filename, 'filename': filename,