diff options
Diffstat (limited to 'rtemstoolkit/mailer.py')
-rw-r--r-- | rtemstoolkit/mailer.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rtemstoolkit/mailer.py b/rtemstoolkit/mailer.py index 085a2ce..968432a 100644 --- a/rtemstoolkit/mailer.py +++ b/rtemstoolkit/mailer.py @@ -70,7 +70,7 @@ class mail: def __init__(self, opts): self.opts = opts self.gitconfig_lines = None - if opts.find_arg('--use-gitconfig') is not None: + if self._get_arg('--use-gitconfig'): # Read the output of `git config --list` instead of reading the # .gitconfig file directly because Python 2 ConfigParser does not # accept tabs at the beginning of lines. @@ -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:] |