diff options
| author | Masanori Itoh <itoumsn@nttdata.co.jp> | 2011-04-21 00:11:59 +0900 |
|---|---|---|
| committer | Masanori Itoh <itoumsn@nttdata.co.jp> | 2011-04-21 00:11:59 +0900 |
| commit | bc061d052f0faec69329dca80e5ef41954fbf171 (patch) | |
| tree | b128995d273e23d124a31f5ad06a50f883b1986d /nova/auth | |
| parent | 13ef4912b49158b5a845d0fcba43e1fa5a1c1c00 (diff) | |
| parent | 1a814ba56a696ce796ab7707eacc2ee065c448e8 (diff) | |
| download | nova-bc061d052f0faec69329dca80e5ef41954fbf171.tar.gz nova-bc061d052f0faec69329dca80e5ef41954fbf171.tar.xz nova-bc061d052f0faec69329dca80e5ef41954fbf171.zip | |
Rebased to trunk rev 1005.
Diffstat (limited to 'nova/auth')
| -rw-r--r-- | nova/auth/dbdriver.py | 2 | ||||
| -rw-r--r-- | nova/auth/manager.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/nova/auth/dbdriver.py b/nova/auth/dbdriver.py index d1e3f2ed5..b2c580d83 100644 --- a/nova/auth/dbdriver.py +++ b/nova/auth/dbdriver.py @@ -115,7 +115,7 @@ class DbDriver(object): # on to create the project. This way we won't have to destroy # the project again because a user turns out to be invalid. members = set([manager]) - if member_uids != None: + if member_uids is not None: for member_uid in member_uids: member = db.user_get(context.get_admin_context(), member_uid) if not member: diff --git a/nova/auth/manager.py b/nova/auth/manager.py index dc37ae063..06def220a 100644 --- a/nova/auth/manager.py +++ b/nova/auth/manager.py @@ -268,7 +268,7 @@ class AuthManager(object): LOG.debug(_('Looking up user: %r'), access_key) user = self.get_user_from_access_key(access_key) LOG.debug('user: %r', user) - if user == None: + if user is None: LOG.audit(_("Failed authorization for access key %s"), access_key) raise exception.NotFound(_('No user found for access key %s') % access_key) @@ -280,7 +280,7 @@ class AuthManager(object): project_id = user.name project = self.get_project(project_id) - if project == None: + if project is None: pjid = project_id uname = user.name LOG.audit(_("failed authorization: no project named %(pjid)s" @@ -656,9 +656,9 @@ class AuthManager(object): @rtype: User @return: The new user. """ - if access == None: + if access is None: access = str(uuid.uuid4()) - if secret == None: + if secret is None: secret = str(uuid.uuid4()) with self.driver() as drv: user_dict = drv.create_user(name, access, secret, admin) |
