From 4003aaaa124b1ffa77d07f7e2ae5d16e2dddacf1 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Wed, 1 Mar 2017 01:13:21 +0100 Subject: [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 --- src/leap/bitmask/core/dispatcher.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/leap/bitmask/core/dispatcher.py') 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 -- cgit v1.2.3