summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2016-12-17 15:09:32 +0100
committerLucas Hoffmann <l-m-h@web.de>2016-12-17 15:09:32 +0100
commitdfe697ac171103e34b2aa90fe8e8d0ead09a9ef7 (patch)
treec5407c64b5d9124eeea9997c565360af536c38d7
parenta2e3fb3a164766a9356e5082561acecccca1dbf5 (diff)
Simplify arithmetic comparison
-rw-r--r--alot/helper.py2
1 files changed, 1 insertions, 1 deletions
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]