about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xranger.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger.py b/ranger.py
index 00941750..6d07f608 100755
--- a/ranger.py
+++ b/ranger.py
@@ -55,7 +55,8 @@ try:
 	from ranger import main
 
 except ImportError as errormessage:
-	if str(errormessage).endswith("main"):
+	import sys
+	if not set(sys.argv) & set(('--debug', '-d')):
 		print("Can't import the main module.")
 		print("To run an uninstalled copy of ranger,")
 		print("launch ranger.py in the top directory.")