diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2017-11-05 17:51:05 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2017-11-08 18:27:48 +0000 |
commit | ffcaa20e17283b23d6334b8a5039380571734cfb (patch) | |
tree | bcf22fd84081a72760e3497c8d48e6b4ac988821 /alot | |
parent | 87225c353689f226fe0128b84ee60dd138c1bba2 (diff) |
add test for argparse validator
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/thread.py | 5 |
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() |