summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-02-22 02:35:41 +0100
committerhut <hut@lavabit.com>2013-03-01 12:59:28 +0100
commitd7b2660eb16847f0fce5beef94ac496d57fb27d3 (patch)
tree9a80260107ac7af0eb74e3cb7204ddd5d6b9774b /ranger
parent88d1575d9a728df278e4c7cef365b33bc738f73a (diff)
downloadranger-d7b2660eb16847f0fce5beef94ac496d57fb27d3.tar.gz
removed compatibility for "hidden_filter" option being a regex
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/directory.py8
-rw-r--r--ranger/container/settingobject.py2
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,