summaryrefslogtreecommitdiff
path: root/addons/hw_posbox_homepage
diff options
context:
space:
mode:
authorAntoine Prieels <anp@odoo.com>2019-08-27 08:27:03 +0000
committerAntoine Prieels <anp@odoo.com>2019-09-04 13:10:03 +0000
commit70006311d043198db25d6433c02a65364379fe16 (patch)
treee532b61e5020a47b2c98a696b657cdff8b321661 /addons/hw_posbox_homepage
parent24c93d3f7f2e17674a59e81764684fe4493403f0 (diff)
[IMP] hw_drivers, hw_posbox_homepage: get_ssid helper
Create a helper to get the ssid of the wifi to which the Box is connected.
Diffstat (limited to 'addons/hw_posbox_homepage')
-rw-r--r--addons/hw_posbox_homepage/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hw_posbox_homepage/controllers/main.py b/addons/hw_posbox_homepage/controllers/main.py
index b1353e98cf1..2951857fc3e 100644
--- a/addons/hw_posbox_homepage/controllers/main.py
+++ b/addons/hw_posbox_homepage/controllers/main.py
@@ -63,7 +63,7 @@ class IoTboxHomepage(web.Home):
hostname = str(socket.gethostname())
mac = get_mac()
h = iter(hex(mac)[2:].zfill(12))
- ssid = subprocess.check_output('iwconfig 2>&1 | grep \'ESSID:"\' | sed \'s/.*"\\(.*\\)"/\\1/\'', shell=True).decode('utf-8').rstrip()
+ ssid = helpers.get_ssid()
wired = subprocess.check_output('cat /sys/class/net/eth0/operstate', shell=True).decode('utf-8').strip('\n')
if wired == 'up':
network = 'Ethernet'