Changed equality to None in worker.py to use is keyword (#335)

This commit is contained in:
Wapaul1
2016-08-01 16:56:54 -07:00
committed by Philipp Moritz
parent 79e4a5a00e
commit 96a70e1316
+1 -1
View File
@@ -377,7 +377,7 @@ class Worker(object):
elif isinstance(result, np.generic):
return result
# TODO(pcm): close the associated memory segment; if we don't, this leaks memory (but very little, so it is ok for now)
elif result == None:
elif result is None:
ray.lib.unmap_object(self.handle, segmentid) # need to unmap here because result is passed back "by value" and we have no reference to unmap later
return None # can't subclass None and don't need to because there is a global None
result.ray_objectid = objectid # TODO(pcm): This could be done only for the "get" case in the future if we want to increase performance