diff options
author | hut <hut@lavabit.com> | 2010-01-13 20:57:54 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-01-13 20:57:54 +0100 |
commit | 63502bea559898d5e79738659424fe3875f913ad (patch) | |
tree | 611ca776659ba157733a9ac608c0207a2f680285 /ranger | |
parent | f70ee6b2209af6785cf9a030b1a8893f09a770ac (diff) | |
download | ranger-63502bea559898d5e79738659424fe3875f913ad.tar.gz |
fsobject.directory: removed __getitem__ (too ambiguous)
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/fsobject/directory.py | 5 | ||||
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index 2941edc8..5f038ca2 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/fsobject/directory.py @@ -375,11 +375,6 @@ class Directory(FileSystemObject, Accumulator, SettingsAware): if not self.accessible: raise ranger.fsobject.NotLoadedYet() return len(self.files) - def __getitem__(self, key): - """Get the file by its index""" - if not self.accessible: raise ranger.fsobject.NotLoadedYet() - return self.files[key] - def __eq__(self, other): """Check for equality of the directories paths""" return isinstance(other, Directory) and self.path == other.path diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index abda649d..2eb44112 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -59,7 +59,7 @@ class BrowserColumn(Pager, Widget): self.fm.move_pointer(absolute = index) elif event.pressed(3): try: - clicked_file = self.target[index] + clicked_file = self.target.files[index] self.fm.enter_dir(clicked_file.path) except: pass @@ -201,7 +201,7 @@ class BrowserColumn(Pager, Widget): i = line + self.scroll_begin try: - drawed = self.target[i] + drawed = self.target.files[i] except IndexError: break |