summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex White <alex.white@oarcorp.com>2021-11-12 08:25:48 -0600
committerJoel Sherrill <joel@rtems.org>2021-11-12 08:25:48 -0600
commit6b31bb03aaf98232a21813c471d0298c170dde60 (patch)
tree1c0ad4a0e7a644278b8bc9c951cf46ceef8e8a9c
parentd1df4f6e02fe22d2cb542adbd6ba4248ee077892 (diff)
downloadrtems-tools-6b31bb03aaf98232a21813c471d0298c170dde60.tar.bz2
rtemstoolkit/mailer.py: Fix parsing of options with no optarg
-rw-r--r--rtemstoolkit/mailer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rtemstoolkit/mailer.py b/rtemstoolkit/mailer.py
index 32cbc23..968432a 100644
--- a/rtemstoolkit/mailer.py
+++ b/rtemstoolkit/mailer.py
@@ -86,7 +86,10 @@ class mail:
if self._args_are_macros():
value = self.opts.find_arg(arg)
if value is not None:
- value = self.opts.find_arg(arg)[1]
+ if len(value) > 1:
+ value = self.opts.find_arg(arg)[1]
+ else:
+ value = True
else:
if arg.startswith('--'):
arg = arg[2:]