realtek: scripts: fix error in belkin-header
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Fri, 11 Oct 2024 19:11:43 +0000 (15:11 -0400)
committerRobert Marko <robimarko@gmail.com>
Fri, 11 Oct 2024 21:37:09 +0000 (23:37 +0200)
commit3d7040b7d69cefaccbd7f58c686853e6d3db31f8
treeffd8079bc93f696c7922473464653e31711a3b46
parent6c35333316c4a59f0648a6a27f09c282039844f2
realtek: scripts: fix error in belkin-header

For some reason the new belkin-header.py script works without issues
in a local Fedora build environment. In the OpenWrt build pipeline it
produces the following errors:

Traceback (most recent call last):
  File "/builder/shared-workdir/build/scripts/belkin-header.py", line 92, in <module>
    head = create_header(buf, args.belkin_header, args.belkin_model)
  File "/builder/shared-workdir/build/scripts/belkin-header.py", line 68, in create_header
    head[28:29] = VERSION1.to_bytes(1)
TypeError: to_bytes() missing required argument 'byteorder' (pos 2)

This may be related due to different python version. Fix this by
handing over the needed parameters

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16667
Signed-off-by: Robert Marko <robimarko@gmail.com>
scripts/belkin-header.py