verify other.exe
attr exists before use in __eq__ (#15882)
This commit is contained in:
parent
34627fcbe5
commit
51fbe518b8
@ -209,7 +209,7 @@ def streamify(arg, mode):
|
||||
istream.close()
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.exe == other.exe
|
||||
return hasattr(other, 'exe') and self.exe == other.exe
|
||||
|
||||
def __neq__(self, other):
|
||||
return not (self == other)
|
||||
|
Loading…
Reference in New Issue
Block a user