This is a preparation for 'include' support.
Used unique counter instead of line number for partitions
in .ks file. Line numbers can be equal for different .ks files,
which can cause problems if one .ks file is included into
another.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
self.partitions = []
self.bootloader = None
self.lineno = 0
+ self.partnum = 0
parser = KickStartParser()
subparsers = parser.add_subparsers()
raise KickStartError('%s:%d: %s' % \
(confpath, lineno, err))
if line.startswith('part'):
- self.partitions.append(Partition(parsed, lineno))
+ self.partnum += 1
+ self.partitions.append(Partition(parsed, self.partnum))
else:
if not self.bootloader:
self.bootloader = parsed