mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 03:08:14 +00:00
parent
961c209ab1
commit
b132d95a04
@ -39,16 +39,17 @@ class Symbols:
|
||||
def list(self):
|
||||
self._symbols_path = {}
|
||||
symbols = []
|
||||
for file in os.listdir(get_resource("symbols")):
|
||||
if file.startswith('.'):
|
||||
continue
|
||||
symbol_id = ':/symbols/' + file
|
||||
symbols.append({
|
||||
'symbol_id': symbol_id,
|
||||
'filename': file,
|
||||
'builtin': True,
|
||||
})
|
||||
self._symbols_path[symbol_id] = os.path.join(get_resource("symbols"), file)
|
||||
if get_resource("symbols"):
|
||||
for file in os.listdir(get_resource("symbols")):
|
||||
if file.startswith('.'):
|
||||
continue
|
||||
symbol_id = ':/symbols/' + file
|
||||
symbols.append({
|
||||
'symbol_id': symbol_id,
|
||||
'filename': file,
|
||||
'builtin': True,
|
||||
})
|
||||
self._symbols_path[symbol_id] = os.path.join(get_resource("symbols"), file)
|
||||
directory = self.symbols_path()
|
||||
if directory:
|
||||
for file in os.listdir(directory):
|
||||
|
Loading…
Reference in New Issue
Block a user