diff options
author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-07-28 12:04:49 -0700 |
---|---|---|
committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-07-28 12:04:49 -0700 |
commit | 969ba5028d8b07cece4b4c940ce02f661cecbb71 (patch) | |
tree | 6400d1b3f0b9422b05fbe538196eca702dca410a /nova/context.py | |
parent | 559b73ed18a271dd35c7b9d00306c8c5b33bd45b (diff) | |
download | nova-969ba5028d8b07cece4b4c940ce02f661cecbb71.tar.gz nova-969ba5028d8b07cece4b4c940ce02f661cecbb71.tar.xz nova-969ba5028d8b07cece4b4c940ce02f661cecbb71.zip |
simplify if statement
Diffstat (limited to 'nova/context.py')
-rw-r--r-- | nova/context.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/nova/context.py b/nova/context.py index db19f136c..5b2776d4e 100644 --- a/nova/context.py +++ b/nova/context.py @@ -38,10 +38,7 @@ class RequestContext(object): self.roles = roles or [] self.is_admin = is_admin if self.is_admin is None: - if 'admin' in self.roles: - self.is_admin = True - else: - self.is_admin = False + self.admin = 'admin' in self.roles self.read_deleted = read_deleted self.remote_address = remote_address if not timestamp: |