summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-26 19:17:58 +0100
committerhut <hut@lavabit.com>2010-01-26 19:17:58 +0100
commit9bc5d95c8e9536cde4589f125857cb214523bbff (patch)
tree68ab9f89a37462314f0e66ee6e1f2674d355bccf
parent59ae64bb2c8f7a61e95dd7029b44f6a2cc50f931 (diff)
downloadranger-9bc5d95c8e9536cde4589f125857cb214523bbff.tar.gz
ranger.py: improved handling of bad import
-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.")