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 <nejo@microsoft.com>
  • Loading branch information
neethajohn authored and yxieca committed Aug 31, 2020
1 parent f3ea322 commit 8e30ac1
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 @@ -77,6 +77,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 8e30ac1

Please sign in to comment.