Skip to content

Commit

Permalink
Fixing traceback when get returns empty string rather than None
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsudharsan committed Aug 27, 2022
1 parent 0ae2c9a commit 11c66a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/tunnelstat
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Tunnelstat(object):
for pos, name in enumerate(rates_key_list):
full_table_id = RATES_TABLE_PREFIX + table_id
counter_data = self.db.get(self.db.COUNTERS_DB, full_table_id, name)
if counter_data is None:
if not counter_data:
fields[pos] = STATUS_NA
elif fields[pos] != STATUS_NA:
fields[pos] = float(counter_data)
Expand Down

0 comments on commit 11c66a9

Please sign in to comment.