Michał Górny  committed fb78ace

Fix trying to ref NoneType.

  • Participants
  • Parent commits 7e18823

Comments (0)

Files changed (1)

File ecleankernel/

 	def check_writable(self):
 		for path in (self.vmlinuz, self.systemmap, self.config,
-			if path is not None and not os.access(path, os.W_OK):
+			if path and not os.access(path, os.W_OK):
 				raise OSError('%s not writable, refusing to proceed' % path)
 	def __repr__(self):
 					# modules are not renamed to .old
 					oldk = kernels['%s.old' % kv]
 					oldk.modules = path
- =
+					if
+ =
 					# it seems that these are renamed .old sometimes
-					if oldk.systemmap is None:
+					if not oldk.systemmap and newk.systemmap:
 						oldk.systemmap = newk.systemmap
-					if oldk.config is None:
+					if not oldk.config and newk.config:
 						oldk.config = newk.config
 	return kernels