mgorny/eclean-kernel — Issue #2: getmtime() raises exception when there is no vmlinuz
Author: mgorny
Created: 2011-11-15 19:57:21+00:00
State: open

```
Traceback (most recent call last):
File "./eclean-kernel", line 26, in
sys.exit(main(sys.argv))
File "/home/aidecoe/eclean-kernel/ecleankernel/cli.py", line 85, in main
debug = debug)
File "/home/aidecoe/eclean-kernel/ecleankernel/process.py", line 87, in get_removal_list
ordered = sorted(kernels, key = getmtime, reverse = True)
File "/home/aidecoe/eclean-kernel/ecleankernel/process.py", line 85, in getmtime
return os.path.getmtime(k.vmlinuz)
File "/usr/lib/python2.7/genericpath.py", line 54, in getmtime
return os.stat(filename).st_mtime
TypeError: coercing to Unicode: need string or buffer, NoneType found
```