checks before deleting kwargs from the context
Make sure to check if the kwarg is there before deleting it. bug 1074422 Change-Id: I66f5338b100f3c16f7e0ca0382ecfea22b099726
This commit is contained in:
parent
11a3e531f7
commit
4b67e70886
@ -34,10 +34,12 @@ class ReddwarfContext(context.RequestContext):
|
||||
"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.limit = kwargs['limit']
|
||||
self.marker = kwargs['marker']
|
||||
del kwargs['limit']
|
||||
del kwargs['marker']
|
||||
self.limit = kwargs.get('limit')
|
||||
if 'limit' in kwargs:
|
||||
del kwargs['limit']
|
||||
self.marker = kwargs.get('marker')
|
||||
if 'marker' in kwargs:
|
||||
del kwargs['marker']
|
||||
super(ReddwarfContext, self).__init__(**kwargs)
|
||||
|
||||
def to_dict(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user