[modules/kernel] Use Python standard module "platform"
Instead of executing an external call to "uname", use the standard Python module "platform" to retrieve information about the kernel used. Positive side-effect: This is portable, if i3 ever exists on Windows :P
This commit is contained in:
parent
955f123b88
commit
fe5bbd4b46
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
"""Shows Linux kernel version information"""
|
||||
|
||||
import platform
|
||||
|
||||
import bumblebee.input
|
||||
import bumblebee.output
|
||||
import bumblebee.engine
|
||||
|
@ -11,7 +13,7 @@ class Module(bumblebee.engine.Module):
|
|||
super(Module, self).__init__(engine, config,
|
||||
bumblebee.output.Widget(full_text=self.output)
|
||||
)
|
||||
self._release_name = bumblebee.util.execute("uname -r")[:-1]
|
||||
self._release_name = platform.release()
|
||||
|
||||
def output(self, widget):
|
||||
return self._release_name
|
||||
|
|
Loading…
Reference in a new issue