coredevice: Don't use `is` to compare with integer literal

This works on CPython, but is not guaranteed to do so, and
produces a warning since 3.8 (see https://bugs.python.org/issue34850).
This commit is contained in:
David Nadlinger 2019-12-22 05:46:41 +00:00 committed by Sebastien Bourdeauducq
parent 6639d9443d
commit 4431f9b0e4
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ class CommKernel:
args, kwargs = self._receive_rpc_args(embedding_map) args, kwargs = self._receive_rpc_args(embedding_map)
return_tags = self._read_bytes() return_tags = self._read_bytes()
if service_id is 0: if service_id == 0:
service = lambda obj, attr, value: setattr(obj, attr, value) service = lambda obj, attr, value: setattr(obj, attr, value)
else: else:
service = embedding_map.retrieve_object(service_id) service = embedding_map.retrieve_object(service_id)