From 8b353443d6e4523d9d95cba190daaec564838e72 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 12 Sep 2012 08:58:20 +0900 Subject: close fd. with breaks with StringIO passed in tests. --- src/leap/eip/checks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/leap/eip') diff --git a/src/leap/eip/checks.py b/src/leap/eip/checks.py index 24e97335..4dd4a95c 100644 --- a/src/leap/eip/checks.py +++ b/src/leap/eip/checks.py @@ -84,8 +84,9 @@ class LeapNetworkChecker(object): if not platform.system() == "Linux": raise NotImplementedError - with open("/proc/net/route") as f: - route_table = f.readlines() + f = open("/proc/net/route") + route_table = f.readlines() + f.close() #toss out header route_table.pop(0) @@ -395,7 +396,6 @@ class EIPConfigChecker(object): # We should WRITE eip config if missing or # incomplete at this point - # # private helpers # -- cgit v1.2.3