summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-10-18 17:06:02 +0200
committerhut <hut@lavabit.com>2012-11-09 23:31:23 +0100
commitc3cc82296bfa78b37def79533e82e0e85b4069c0 (patch)
tree1cd115a96fe4435d76841a31b5ed291b85bac1b4 /ranger
parent3ac379cab918a0b1e5d171c7acb41775724e22fd (diff)
downloadranger-c3cc82296bfa78b37def79533e82e0e85b4069c0.tar.gz
core.actions: fixed ci key
before, in the search_next method, item.mimetype could be None,
resulting in an exception in lst.sort(key=fnc) when
order == 'mimetype'.
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/actions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 42770156..cbe74132 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -600,7 +600,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 				if order == 'size':
 					fnc = lambda item: -item.size
 				elif order == 'mimetype':
-					fnc = lambda item: item.mimetype
+					fnc = lambda item: item.mimetype or ''
 				elif order == 'ctime':
 					fnc = lambda item: -int(item.stat and item.stat.st_ctime)
 				elif order == 'atime':