-
Notifications
You must be signed in to change notification settings - Fork 12
Wrong type for "--count" arg #3
Copy link
Copy link
Open
Description
The "--count" argument does not really work:
# python /var/tmp/bind-query-log-stats.py --count 10 /var/log/dns/query.log
Processing logfile /var/log/dns/query.log
<skip>
Top ['10'] DNS names requested:
Traceback (most recent call last):
File "/var/tmp/bind-query-log-stats.py", line 265, in <module>
print_top_dns_requests(COUNT)
File "/var/tmp/bind-query-log-stats.py", line 97, in print_top_dns_requests
for query, _ in Counter(DNS_QUERIES).most_common(num_print):
File "/usr/lib64/python2.7/collections.py", line 462, in most_common
return _heapq.nlargest(n, self.iteritems(), key=_itemgetter(1))
File "/usr/lib64/python2.7/heapq.py", line 465, in nlargest
result = _nlargest(n, it)
TypeError: an integer is required
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels