mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 01:46:13 +01:00
Allow comparing File with a string
This commit is contained in:
parent
55503e13ca
commit
7d64d5d425
@ -266,6 +266,8 @@ class File:
|
||||
return self.name
|
||||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, str):
|
||||
return self.name == other
|
||||
self_data = (self.name, self.md5, self.size, self.mtime, self.skipped)
|
||||
other_data = (other.name, other.md5, other.size, other.mtime, other.skipped)
|
||||
return self_data == other_data
|
||||
|
Loading…
Reference in New Issue
Block a user