Check for None first
This commit is contained in:
parent
ca7b4580fa
commit
983a3769e7
@ -55,7 +55,7 @@ class GraphItem(GraphicsObject):
|
|||||||
"""
|
"""
|
||||||
if 'adj' in kwds:
|
if 'adj' in kwds:
|
||||||
self.adjacency = kwds.pop('adj')
|
self.adjacency = kwds.pop('adj')
|
||||||
if self.adjacency.dtype.kind not in 'iu' and self.adjacency is not None:
|
if self.adjacency is not None and self.adjacency.dtype.kind not in 'iu':
|
||||||
raise Exception("adjacency array must have int or unsigned type.")
|
raise Exception("adjacency array must have int or unsigned type.")
|
||||||
self._update()
|
self._update()
|
||||||
if 'pos' in kwds:
|
if 'pos' in kwds:
|
||||||
|
Loading…
Reference in New Issue
Block a user