Autotest upstream merge.
Merged from d9d64b855363d214996b187380532d4cc9991d29 to
7bad38846fe9c74e42018131ce85aec2b5e6c7a9
BUG=none
TEST=emerge autotest, run bvt, smoke.
Change-Id: Ibe6462198e84e0d41fa160af086283cd712da4a6
Reviewed-on: http://gerrit.chromium.org/gerrit/7440
Tested-by: Dale Curtis <[email protected]>
Reviewed-by: Dale Curtis <[email protected]>
diff --git a/cli/acl.py b/cli/acl.py
index d6f5baa..0b20acf 100644
--- a/cli/acl.py
+++ b/cli/acl.py
@@ -79,23 +79,26 @@
(options, leftover) = super(acl_list, self).parse([user_info,
host_info])
- if ((self.users and (self.hosts or self.acls)) or
- (self.hosts and self.acls)):
+ users = getattr(self, 'users')
+ hosts = getattr(self, 'hosts')
+ acls = getattr(self, 'acls')
+ if ((users and (hosts or acls)) or
+ (hosts and acls)):
self.invalid_syntax('Only specify one of --user,'
'--machine or ACL')
- if len(self.users) > 1:
+ if len(users) > 1:
self.invalid_syntax('Only specify one <user>')
- if len(self.hosts) > 1:
+ if len(hosts) > 1:
self.invalid_syntax('Only specify one <machine>')
try:
- self.users = self.users[0]
+ self.users = users[0]
except IndexError:
pass
try:
- self.hosts = self.hosts[0]
+ self.hosts = hosts[0]
except IndexError:
pass
return (options, leftover)