explicitly checking for None as per code review feedback

- instead of implicit (non-truthy) test
This commit is contained in:
Adam Feuer
2014-08-09 09:04:05 -07:00
parent 25f08ff68e
commit ef7da3be4a
+2 -2
View File
@@ -57,8 +57,8 @@ def pil_to_ndarray(im, dtype=None):
elif 'A' in im.mode:
im = im.convert('RGBA')
im = np.array(im, dtype=dtype)
if fp:
fp.close()
if fp is not None:
fp.close()
return im