Remove the redundant default value

When get a value from a dict, it returns the value of the key,
if the key does not existed in the dict, the dafault value is
None, So we don't need to specify the default None value again.

Change-Id: Iff4a9c14e356f8ec59fc79ef00aa8207bf926c9e
This commit is contained in:
junboli 2017-07-12 16:11:33 +08:00 committed by junbo.li
parent c19aed2a40
commit d924f95b6f
3 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ class EventTriggersController(rest.RestController):
values = event_trigger.to_dict()
for field in UPDATE_NOT_ALLOWED:
if values.get(field, None):
if values.get(field):
raise exc.EventTriggerException(
"Can not update fields %s of event trigger." %
UPDATE_NOT_ALLOWED

View File

@ -81,7 +81,7 @@ class KombuRPCListener(ConsumerMixin):
correlation_id = message.properties['correlation_id']
queue = self._results.get(correlation_id, None)
queue = self._results.get(correlation_id)
if queue:
result = {

View File

@ -227,7 +227,7 @@ class KombuRPCServer(rpc_base.RPCServer, kombu_base.Base):
is_async = request.get('async', False)
rpc_ctx = request.get('rpc_ctx')
redelivered = message.delivery_info.get('redelivered', None)
redelivered = message.delivery_info.get('redelivered')
rpc_method_name = request.get('rpc_method')
arguments = self._deserialize_message(request.get('arguments'))
correlation_id = message.properties['correlation_id']