pybootd
pybootd copied to clipboard
local variable 'bootfile_size' referenced before assignment
Hello,
when I try to boot RHEL 8.4 I encounter the following:
15:38:39 PXE[pxed] CRITICAL: local variable 'bootfile_size' referenced before assignment
Traceback (most recent call last):
File "/home/cklein/Development/3rdParty/pybootd/pybootd/pxed.py", line 431, in start
self.handle(sock, addr, data)
File "/home/cklein/Development/3rdParty/pybootd/pybootd/pxed.py", line 843, in handle
extra_buf = self.build_pxe_options(options, server, buf)
File "/home/cklein/Development/3rdParty/pybootd/pybootd/pxed.py", line 498, in build_pxe_options
if bootfile_size:
UnboundLocalError: local variable 'bootfile_size' referenced before assignment
When I insert in the file pxed.py in the function build_pxe_options a line which sets the bootfile_size to 0 then it works:
def build_pxe_options(self, options, server, bootp_buf):
try:
client_params = options[55]
except IndexError:
client_params = b''
buf = b''
bootfile_size = 0
try:
if 97 in client_params:
uuid = options[97]
buf += spack('!BB%ds' % len(uuid),
97, len(uuid), uuid)
# etc