summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2017-11-05 17:51:05 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2017-11-08 18:27:48 +0000
commitffcaa20e17283b23d6334b8a5039380571734cfb (patch)
treebcf22fd84081a72760e3497c8d48e6b4ac988821 /alot
parent87225c353689f226fe0128b84ee60dd138c1bba2 (diff)
add test for argparse validator
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/thread.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 700149d9..dcce2edb 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -577,8 +577,9 @@ class ChangeDisplaymodeCommand(Command):
elif self.indent == '-':
newindent = tbuffer._indent_width - 1
else:
- # argparse validation guarantees that self.indent is an integer
- newindent = self.indent
+ # argparse validation guarantees that self.indent
+ # can be cast to an integer
+ newindent = int(self.indent)
# make sure indent remains non-negative
tbuffer._indent_width = max(newindent, 0)
tbuffer.rebuild()