diff options
author | hut <hut@lavabit.com> | 2010-01-26 19:17:58 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-01-26 19:17:58 +0100 |
commit | 9bc5d95c8e9536cde4589f125857cb214523bbff (patch) | |
tree | 68ab9f89a37462314f0e66ee6e1f2674d355bccf | |
parent | 59ae64bb2c8f7a61e95dd7029b44f6a2cc50f931 (diff) | |
download | ranger-9bc5d95c8e9536cde4589f125857cb214523bbff.tar.gz |
ranger.py: improved handling of bad import
-rwxr-xr-x | ranger.py | 3 |
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.") |