Skip to content

Commit

Permalink
Fix pfcwd stats crash with invalid queue name (#1077)
Browse files Browse the repository at this point in the history
Signed-off-by: Neetha John <[email protected]>
  • Loading branch information
neethajohn authored Aug 26, 2020
1 parent 3425be4 commit 58c2961
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pfcwd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def stats(empty, queues):
for queue in queues:
stats_list = []
queue_oid = db.get(db.COUNTERS_DB, 'COUNTERS_QUEUE_NAME_MAP', queue)
if queue_oid is None:
continue
stats = db.get_all(db.COUNTERS_DB, 'COUNTERS:' + queue_oid)
if stats is None:
continue
Expand Down

0 comments on commit 58c2961

Please sign in to comment.