Skip to content

Commit f53e1db

Browse files
committed
Topology: avoid crashing when namespace is unknown
Signed-off-by: Dinesh Dutt <[email protected]>
1 parent 163c14e commit f53e1db

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

suzieq/engines/pandas/topology.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
class TopologyObj(SqPandasEngine):
2424
'''Backend class to operate on virtual table, topology, with pandas'''
2525

26+
def __init__(self, baseobj):
27+
super().__init__(baseobj)
28+
self.lsdb = pd.DataFrame()
29+
self._a_df = pd.DataFrame()
30+
self._ip_table = pd.DataFrame()
31+
self.nses = []
32+
2633
@staticmethod
2734
def table_name():
2835
'''Table name'''
@@ -86,9 +93,6 @@ class Services:
8693
self._init_dfs(self._namespaces)
8794
if self._if_df.empty:
8895
return pd.DataFrame({'error': ['No interfaces data found']})
89-
self.lsdb = pd.DataFrame()
90-
self._a_df = pd.DataFrame()
91-
self._ip_table = pd.DataFrame()
9296

9397
fields = self.schema.get_display_fields(columns)
9498

0 commit comments

Comments
 (0)