mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-06 15:28:28 +01:00
data_item: handle __eq__ if other == None
Currently it is not possible to check if data_item == None, as __eq__ tries to access .data in 'None' object and thus throws an exception. Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -62,6 +62,9 @@ class DataItem(object):
|
||||
return self.data.dvc.__hash__()
|
||||
|
||||
def __eq__(self, other):
|
||||
if other == None:
|
||||
return False
|
||||
|
||||
return self.data.dvc == other.data.dvc
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user