Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for procnettcp.py if IPv6 is disabled

If /proc/net/tcp6 doesn't exist, we die with:
procnettcp.py:     procfile.seek(0)
AttributeError: 'NoneType' object has no attribute 'seek'

Change-Id: I9127be78df8cf497cc8cbc25a857d5552bc03012
Reviewed-on: https://review.stumble.net/1952
Tested-by: Benoit Sigoure <tsuna@stumbleupon.com>
Reviewed-by: Benoit Sigoure <tsuna@stumbleupon.com>
  • Loading branch information...
commit bcaed6dfceb210a4b1d2d911052490b97f45cda1 1 parent 4fb6aae
@davebarr davebarr authored tsuna committed
Showing with 2 additions and 0 deletions.
  1. +2 −0  collectors/0/procnettcp.py
View
2  collectors/0/procnettcp.py
@@ -194,6 +194,8 @@ def main(unused_args):
counter = {}
for procfile in (tcp, tcp6):
+ if procfile is None:
+ continue
procfile.seek(0)
ts = int(time.time())
for line in procfile:
Please sign in to comment.
Something went wrong with that request. Please try again.