diff options
author | hut <hut@lepus.uberspace.de> | 2016-05-06 23:37:19 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2016-05-06 23:37:19 +0200 |
commit | 3c88eefbc81c8fe906c4b7c97243edae0bcaf0cb (patch) | |
tree | 9d87222ef920fa928a773eaf63e8b6a40710acb9 /ranger | |
parent | 523689c114f0688e8efb3831e13e5214a2a858f3 (diff) | |
parent | 5b2f1c8c696beb2c7e2e6d779955d28a77fcec7c (diff) | |
download | ranger-3c88eefbc81c8fe906c4b7c97243edae0bcaf0cb.tar.gz |
Merge branch 'master' of https://github.com/ajtluser/ranger
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/container/file.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ranger/container/file.py b/ranger/container/file.py index a3db63a5..2c6d8315 100644 --- a/ranger/container/file.py +++ b/ranger/container/file.py @@ -96,3 +96,12 @@ class File(FileSystemObject): return self.fm.previews[self.realpath]['imagepreview'] except KeyError: return False + + def __eq__(self, other): + return isinstance(other, File) and self.path == other.path + + def __neq__(self, other): + return not self.__eq__(other) + + def __hash__(self): + return hash(self.path) |