[rtems-tools commit] rtemstoolkit/mailer.py: Fix parsing of options with no optarg

Joel Sherrill joel at rtems.org
Fri Nov 12 14:22:21 UTC 2021


Module:    rtems-tools
Branch:    master
Commit:    6b31bb03aaf98232a21813c471d0298c170dde60
Changeset: http://git.rtems.org/rtems-tools/commit/?id=6b31bb03aaf98232a21813c471d0298c170dde60

Author:    Alex White <alex.white at oarcorp.com>
Date:      Fri Nov 12 08:25:48 2021 -0600

rtemstoolkit/mailer.py: Fix parsing of options with no optarg

---

 rtemstoolkit/mailer.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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:]



More information about the vc mailing list