From dfe697ac171103e34b2aa90fe8e8d0ead09a9ef7 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 17 Dec 2016 15:09:32 +0100 Subject: Simplify arithmetic comparison --- alot/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alot/helper.py b/alot/helper.py index ba68bd45..9264e785 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -133,7 +133,7 @@ def string_decode(string, enc='ascii'): def shorten(string, maxlen): """shortens string if longer than maxlen, appending ellipsis""" - if maxlen > 1 and len(string) > maxlen: + if 1 < maxlen < len(string): string = string[:maxlen - 1] + u'\u2026' return string[:maxlen] -- cgit v1.2.3