add 'which' function to utils and use for 'iwgetid'
This commit is contained in:
parent
feabc7ad98
commit
8c12daa407
2 changed files with 20 additions and 1 deletions
|
@ -35,6 +35,8 @@ class Module(bumblebee.engine.Module):
|
|||
self._states["include"].append(state)
|
||||
self._format = self.parameter("format","{intf} {state} {ip} {ssid}");
|
||||
self._update_widgets(widgets)
|
||||
self.iwgetid = bumblebee.util.which("iwgetid")
|
||||
|
||||
|
||||
def update(self, widgets):
|
||||
self._update_widgets(widgets)
|
||||
|
@ -106,7 +108,7 @@ class Module(bumblebee.engine.Module):
|
|||
def get_ssid(self, intf):
|
||||
if self._iswlan(intf):
|
||||
try:
|
||||
return subprocess.check_output(["iwgetid","-r",intf]).strip().decode('utf-8')
|
||||
return subprocess.check_output([self.iwgetid,"-r",intf]).strip().decode('utf-8')
|
||||
except:
|
||||
return ""
|
||||
return ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue