From d7b2660eb16847f0fce5beef94ac496d57fb27d3 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 22 Feb 2013 02:35:41 +0100 Subject: removed compatibility for "hidden_filter" option being a regex --- ranger/container/directory.py | 8 +------- ranger/container/settingobject.py | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ranger/container/directory.py b/ranger/container/directory.py index 878b4f1d..8223aeab 100644 --- a/ranger/container/directory.py +++ b/ranger/container/directory.py @@ -184,13 +184,7 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): self.mount_path = mount_path(mypath) if not self.settings.show_hidden and self.settings.hidden_filter: - # COMPAT - # hidden_filter used to be a regex, not a string. If an - # old config is used, we don't need to re.compile it. - if hasattr(self.settings.hidden_filter, 'search'): - hidden_filter = self.settings.hidden_filter - else: - hidden_filter = re.compile(self.settings.hidden_filter) + hidden_filter = re.compile(self.settings.hidden_filter) else: hidden_filter = None diff --git a/ranger/container/settingobject.py b/ranger/container/settingobject.py index 76ab7fc4..1a31efa0 100644 --- a/ranger/container/settingobject.py +++ b/ranger/container/settingobject.py @@ -22,7 +22,7 @@ ALLOWED_SETTINGS = { 'draw_borders': bool, 'draw_progress_bar_in_status_bar': bool, 'flushinput': bool, - 'hidden_filter': (str, type(re.compile(""))), #COMPAT change to str-only + 'hidden_filter': str, 'max_console_history_size': (int, type(None)), 'max_history_size': (int, type(None)), 'mouse_enabled': bool, -- cgit 1.4.1-2-gfad0