Commits

Michał Górny  committed 5335f74

No working bootloader is an error, not no kernels anymore.

  • Participants
  • Parent commits eec2df2

Comments (0)

Files changed (1)

File ecleankernel/process.py

 	if limit is None or limit > 0:
 		if not destructive:
 			used = ()
+			lastbl = None
 			for bl in bootloaders:
 				if bootloader in ('auto', bl.name):
 					debug.printf('Trying bootloader %s', bl.name)
 						lastbl = blinst
 						break
 
-			realpaths = [os.path.realpath(x) for x in used]
-			if not realpaths:
+			if lastbl is None:
 				raise SystemError('Unable to get kernels from bootloader config (%s)'
 						% bootloader)
+			realpaths = [os.path.realpath(x) for x in used]
 
 			prefix = re.compile(r'^/boot/(vmlinu[xz]|kernel|bzImage)-')
 			def unprefixify(filenames):