Skip to content
Snippets Groups Projects
Unverified Commit 062e57ea authored by Odoo's Mergebot's avatar Odoo's Mergebot Committed by GitHub
Browse files

[FIX] hw_drivers, hw_posbox_upgrade: IoT Box fixes


- The upgrade page shows the last commit that is present on the box. If
the message commit was too long, the layout was broken.

- In the latest version of Raspbian, when no display is connected to the
HDMI port, `tvservice -n` finds a display named "Unk-Composite dis".
Therefore, the `distant_display` was not created.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#37044

Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
parents 16c17bc1 79ad17a7
No related branches found
No related tags found
No related merge requests found
......@@ -296,8 +296,8 @@ class Manager(Thread):
def get_connected_displays(self):
display_devices = {}
hdmi = subprocess.check_output(['tvservice', '-n']).decode('utf-8')
if hdmi.find('=') != -1:
hdmi = subprocess.check_output(['tvservice', '-n']).decode('utf-8').replace('\n', '')
if hdmi.find('=') != -1 and hdmi.split('=')[1] != "Unk-Composite dis":
hdmi_serial = sub('[^a-zA-Z0-9 ]+', '', hdmi.split('=')[1]).replace(' ', '_')
iot_device = IoTDevice({
'identifier': hdmi_serial,
......
......@@ -63,7 +63,7 @@
<div style="padding-bottom: 5px; font-weight: bold;">
Latest patch:
</div>
<pre style="margin: 0;padding: 15px 0;">{{ commit|safe }}</pre>
<pre style="margin: 0;padding: 15px 0; overflow: auto;">{{ commit|safe }}</pre>
</div>
<div class="text-center" style="margin: 15px auto;">
<a class="btn" href='#' id='upgrade'>Upgrade</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment