about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-14 21:51:00 +0200
committerhut <hut@lavabit.com>2010-05-14 21:51:00 +0200
commit3cec441a10f4d4358fba414005163ed1a6c539f2 (patch)
tree24303bb2b770c8973584b70b12f51c33eb4526c3
parent1cbc0f48b92ef9dd24f245058a565742a924df1e (diff)
downloadranger-3cec441a10f4d4358fba414005163ed1a6c539f2.tar.gz
main: fixed --clean
-rw-r--r--ranger/__main__.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/ranger/__main__.py b/ranger/__main__.py
index e3d98d6e..916c5a0e 100644
--- a/ranger/__main__.py
+++ b/ranger/__main__.py
@@ -73,8 +73,9 @@ def allow_access_to_confdir(confdir, allow):
 
 
 def load_settings(fm, clean):
-	import ranger
+	import ranger.shared
 	import ranger.api.commands
+	import ranger.api.keys
 	if not clean:
 		allow_access_to_confdir(ranger.arg.confdir, True)
 
@@ -97,10 +98,8 @@ def load_settings(fm, clean):
 			from ranger.defaults import apps
 
 		# Load keys
-		from ranger import shared, api
-		from ranger.api import keys
-		keymanager = shared.EnvironmentAware.env.keymanager
-		keys.keymanager = keymanager
+		keymanager = ranger.shared.EnvironmentAware.env.keymanager
+		ranger.api.keys.keymanager = keymanager
 		from ranger.defaults import keys
 		try:
 			import keys
@@ -115,6 +114,9 @@ def load_settings(fm, clean):
 	else:
 		comcont = ranger.api.commands.CommandContainer()
 		ranger.api.commands.alias = comcont.alias
+		from ranger.api import keys
+		keymanager = ranger.shared.EnvironmentAware.env.keymanager
+		ranger.api.keys.keymanager = keymanager
 		from ranger.defaults import commands, keys, apps
 		comcont.load_commands_from_module(commands)
 		commands = comcont