Code cleanup

This commit is contained in:
derv82
2018-04-18 14:42:24 -04:00
parent 8f32972546
commit 2b40ce3706
9 changed files with 333 additions and 279 deletions

View File

@@ -4,7 +4,9 @@
class Iwconfig(object):
@classmethod
def exists(cls):
pass
from ..util.process import Process
return Process.exists('iwconfig')
@classmethod
def mode(cls, iface, mode_name):
@@ -15,6 +17,7 @@ class Iwconfig(object):
return pid.poll()
@classmethod
def get_interfaces(cls, mode=None):
from ..util.process import Process
@@ -34,5 +37,6 @@ class Iwconfig(object):
if mode is not None and 'Mode:{}'.format(mode) in line:
interfaces.add(iface)
return list(interfaces)