Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion xcp/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@

class Bootloader(object):
# pylint: disable=too-many-positional-arguments
def __init__(self, src_fmt, src_file, menu = None, menu_order = None,

Check notice on line 87 in xcp/bootloader.py

View workflow job for this annotation

GitHub Actions / test (3.13, ubuntu-22.04)

pylint R0913: too-many-arguments

Refactor: Too many arguments (11/10)
default = None, timeout = None, serial = None,
location = None, env_block = None):
location = None, env_block = None, prefix = None):

if menu is None:
menu = {}
Expand All @@ -104,6 +104,7 @@
self.serial = serial
self.location = location and location or 'mbr'
self.env_block = env_block
self.prefix = prefix

def append(self, label, entry):
self.menu[label] = entry
Expand Down Expand Up @@ -297,6 +298,9 @@
else:
fh = open_textfile(cast(str, dst_file), "w")

if self.prefix:
print(f"search --no-floppy --fs-uuid --set=rootdev {self.prefix['uuid']}", file=fh)
print(f"set prefix=($rootdev){self.prefix['path']}", file=fh)
if self.serial:
print("serial --unit=%s --speed=%s" % (self.serial['port'],
self.serial['baud']), file=fh)
Expand Down
Loading