Commits

Michał Górny  committed ae80cfe

Use tuples instead of dict for globs, to keep order.

  • Participants
  • Parent commits 9519270

Comments (0)

Files changed (1)

File ecleankernel/kernel.py

 def find_kernels():
 	""" Find all files and directories related to installed kernels. """
 
-	globs = {
-		'vmlinuz': '/boot/vmlinuz-',
-		'systemmap': '/boot/System.map-',
-		'config': '/boot/config-',
-		'modules': '/lib/modules/'
-	}
+	globs = (
+		('vmlinuz', '/boot/vmlinuz-'),
+		('systemmap', '/boot/System.map-'),
+		('config', '/boot/config-'),
+		('modules', '/lib/modules/')
+	)
 
 	kernels = KernelDict()
-	for cat, g in globs.items():
+	for cat, g in globs:
 		for m in glob('%s*' % g):
 			kv = m[len(g):]
 			setattr(kernels[kv], cat, m)