diff options
author | Jenkins <jenkins@review.openstack.org> | 2012-02-29 22:48:08 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2012-02-29 22:48:08 +0000 |
commit | 873830948c19012931a5b220f7e7f1089149b538 (patch) | |
tree | 7b679f8230b1853a316747ec5a854d342e2a18bf /nova/context.py | |
parent | 07c85f5a835a93a2b4a828510a09adbc30505761 (diff) | |
parent | ff95c90f51d1d1e70a247cb7e94bb7cb757ac37d (diff) | |
download | nova-873830948c19012931a5b220f7e7f1089149b538.tar.gz nova-873830948c19012931a5b220f7e7f1089149b538.tar.xz nova-873830948c19012931a5b220f7e7f1089149b538.zip |
Merge "Ensure that context read_deleted is only one of 'no', 'yes' or 'only'"
Diffstat (limited to 'nova/context.py')
-rw-r--r-- | nova/context.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/context.py b/nova/context.py index 58deb1318..8ec4a30ec 100644 --- a/nova/context.py +++ b/nova/context.py @@ -48,6 +48,10 @@ class RequestContext(object): :param overwrite: Set to False to ensure that the greenthread local copy of the index is not overwritten. """ + if read_deleted not in ('no', 'yes', 'only'): + raise ValueError(_("read_deleted can only be one of 'no', " + "'yes' or 'only', not %r") % read_deleted) + self.user_id = user_id self.project_id = project_id self.roles = roles or [] |