Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
fix Empty "Whitelist(ing) ratio" of nxtool.py #381 (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
jreisinger authored and buixor committed Aug 11, 2017
1 parent d2d6074 commit 41567d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nxapi/nxtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,12 @@ def get_filter(arg_filter):
# statistics
if options.stats is True:
print translate.red.format("# Whitelist(ing) ratio :")
translate.fetch_top(cfg.cfg["global_filters"], "whitelisted", limit=2)
for e in translate.fetch_top(cfg.cfg["global_filters"], "whitelisted", limit=2):
try:
list_e = e.split()
print '# {0} {1} {2}{3}'.format(translate.grn.format(list_e[0]), list_e[1], list_e[2], list_e[3])
except:
print "--malformed--"
print translate.red.format("# Top servers :")
for e in translate.fetch_top(cfg.cfg["global_filters"], "server", limit=10):
try:
Expand Down

0 comments on commit 41567d6

Please sign in to comment.