Fix a TypeError in notification_sample_base.py
In notification_sample_base, a possible error is found and fixed, as extra_params['return_reservation_id'] = True is a valid code only when extra_params is not None. However, this is not checked. So when we try to boot a server without extra parameters, a TypeError is raised: TypeError: 'NoneType' object does not support item assignment In this patchset, the possible bug is fixed. Change-Id: I80e2286b231da39b8c1e4225145422ac48daee68
This commit is contained in:
parent
0132cc8c26
commit
569e463f02
|
@ -152,9 +152,8 @@ class NotificationSampleTestBase(test.TestCase,
|
|||
image_uuid='155d900f-4e14-4e4c-a73d-069cbf4541e6',
|
||||
flavor_id=flavor_id)
|
||||
|
||||
extra_params['return_reservation_id'] = True
|
||||
|
||||
if extra_params:
|
||||
extra_params['return_reservation_id'] = True
|
||||
server.update(extra_params)
|
||||
|
||||
post = {'server': server}
|
||||
|
|
Loading…
Reference in New Issue