Skip to content

Commit 5a45e05

Browse files
committed
path: handle change in pandas behavior w.r.t. at()
Signed-off-by: Dinesh Dutt <[email protected]>
1 parent 7687bbe commit 5a45e05

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

suzieq/engines/pandas/path.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,13 @@ def _find_fhr_df(self, device: str, ip: str) -> pd.DataFrame:
291291
# is obtained from the MAC because of trunk ports.
292292
if idf.empty:
293293
continue
294-
idf.at[idf.index, 'vlan'] = mac_entry.vlan.iloc[0]
294+
idfidx = idf.index.values[0]
295+
idf.at[idfidx, 'vlan'] = mac_entry.vlan.iloc[0]
296+
295297
if (idf.master == 'bridge').all():
296-
idf.at[idf.index, 'ipAddressList'] = f'{ip}/32'
298+
idf.at[idfidx, 'ipAddressList'] = f'{ip}/32'
297299
# Assuming the VRF is identical across multiple entries
298-
idf.at[idf.index, 'master'] = rslt_df.iloc[0].vrf
300+
idf.at[idfidx, 'master'] = rslt_df.iloc[0].vrf
299301
else:
300302
idf = self._if_df.query(f'hostname=="{row.hostname}" and '
301303
f'ifname=="{row.oif}" and '

0 commit comments

Comments
 (0)