From c921a418d1241170b78c3a4bdc4fd6a5083432fd Mon Sep 17 00:00:00 2001 From: Christian Zangl Date: Mon, 5 Feb 2018 22:25:02 +0100 Subject: fix automatically_count_files false --- ranger/ext/human_readable.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ranger/ext/human_readable.py b/ranger/ext/human_readable.py index df74eabf..f365e594 100644 --- a/ranger/ext/human_readable.py +++ b/ranger/ext/human_readable.py @@ -15,6 +15,10 @@ def human_readable(byte, separator=' '): # pylint: disable=too-many-return-stat '1023 M' """ + # handle automatically_count_files false + if byte is None: + return '' + # I know this can be written much shorter, but this long version # performs much better than what I had before. If you attempt to # shorten this code, take performance into consideration. -- cgit 1.4.1-2-gfad0