summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@hut.pm>2017-12-25 18:01:25 +0100
committerhut <hut@hut.pm>2017-12-25 18:01:25 +0100
commit23c657263099a2a0148e62805d2810bf44b01a23 (patch)
tree74cdca61a98e9d23e65e6549aae8ec88276cf3bb
parent0ed04b63c94b8fdc557401f5986ca81651fd0a59 (diff)
downloadranger-23c657263099a2a0148e62805d2810bf44b01a23.tar.gz
config.commands: import ranger for eval(). Fixes #1007
-rwxr-xr-xranger/config/commands.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 299f17c2..efbfd774 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -891,6 +891,8 @@ class eval_(Command):
     resolve_macros = False
 
     def execute(self):
+        # The import is needed so eval() can access the ranger module
+        import ranger  # NOQA pylint: disable=unused-import
         if self.arg(1) == '-q':
             code = self.rest(2)
             quiet = True