diff options
author | Ruben Pollan <meskio@sindominio.net> | 2017-03-01 01:13:21 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2017-03-03 00:47:22 +0100 |
commit | 4003aaaa124b1ffa77d07f7e2ae5d16e2dddacf1 (patch) | |
tree | 295e72d97ff8a24048fa647420233128a47c4bb8 /src/leap/bitmask/core/dispatcher.py | |
parent | 4a5e181138e4ccd324d33426f3903825c178af48 (diff) |
[feat] mail status will only work for a valid userid
We used to return the system status if no userid is provided. We don't
do it anymore, now is only userid based.
- Resolves: #8785
Diffstat (limited to 'src/leap/bitmask/core/dispatcher.py')
-rw-r--r-- | src/leap/bitmask/core/dispatcher.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py index f0c4e766..3e50b11f 100644 --- a/src/leap/bitmask/core/dispatcher.py +++ b/src/leap/bitmask/core/dispatcher.py @@ -252,9 +252,11 @@ class MailCmd(SubCommand): @register_method('dict') def do_STATUS(self, mail, *parts, **kw): - userid = None - if len(parts) > 2: + try: userid = parts[2] + except IndexError: + raise DispatchError( + 'wrong number of arguments: expected 1, got none') d = mail.do_status(userid) return d |