Some PEP8 style fixes.

This commit is contained in:
grossmj
2014-05-28 06:26:20 -06:00
parent a39a693cda
commit 7b58f14681
31 changed files with 988 additions and 1014 deletions

View File

@ -96,7 +96,7 @@ def wait_socket_is_ready(host, port, wait=2.0, socket_timeout=10):
connection_success = False
begin = time.time()
last_exception = None
while (time.time() - begin < wait):
while time.time() - begin < wait:
time.sleep(0.01)
try:
with socket.create_connection((host, port), socket_timeout):
@ -107,16 +107,15 @@ def wait_socket_is_ready(host, port, wait=2.0, socket_timeout=10):
connection_success = True
break
return (connection_success, last_exception)
return connection_success, last_exception
def has_privileged_access(executable, device):
def has_privileged_access(executable):
"""
Check if an executable can access Ethernet and TAP devices in
RAW mode.
:param executable: executable path
:param device: device name
:returns: True or False
"""