summary refs log tree commit diff stats
path: root/examples/plugin_chmod_keybindings.py
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-01-20 12:07:53 +0100
committernfnty <git@nfnty.se>2017-01-20 12:07:53 +0100
commit1c90e610de6591e8052a1056c775219b5e767002 (patch)
tree69b56f67dee1d6dfcea869de897846baaded3fa6 /examples/plugin_chmod_keybindings.py
parente26d163debc9f55a89a27f94a43771526d2ff0b7 (diff)
parent03ee065e35c6a8f0e0dc1e66d8f4c3e83c51f315 (diff)
downloadranger-1c90e610de6591e8052a1056c775219b5e767002.tar.gz
Merge branch 'lint'
Diffstat (limited to 'examples/plugin_chmod_keybindings.py')
-rw-r--r--examples/plugin_chmod_keybindings.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/plugin_chmod_keybindings.py b/examples/plugin_chmod_keybindings.py
index 63f42b0e..faab2345 100644
--- a/examples/plugin_chmod_keybindings.py
+++ b/examples/plugin_chmod_keybindings.py
@@ -4,12 +4,16 @@
 # It could replace the ten lines in the rc.conf that create the key bindings
 # for the "chmod" command.
 
+from __future__ import (absolute_import, print_function)
+
 import ranger.api
-old_hook_init = ranger.api.hook_init
+
+
+HOOK_INIT_OLD = ranger.api.hook_init
 
 
 def hook_init(fm):
-    old_hook_init(fm)
+    HOOK_INIT_OLD(fm)
 
     # Generate key bindings for the chmod command
     command = "map {0}{1}{2} shell -d chmod {1}{0}{2} %s"
@@ -18,4 +22,5 @@ def hook_init(fm):
             fm.execute_console(command.format('-', mode, perm))
             fm.execute_console(command.format('+', mode, perm))
 
+
 ranger.api.hook_init = hook_init