diff options
author | hut <hut@lepus.uberspace.de> | 2015-12-05 04:13:52 +0100 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-12-05 04:22:23 +0100 |
commit | a6831bcfaed029632d34812b7b7bebda01438c5e (patch) | |
tree | 3e2a8b62f24fc983b9ac954f2236ac9eb5b773b4 /ranger | |
parent | 834cbb1d8459fb9d5c173dcf9ea2f0651ea09c58 (diff) | |
download | ranger-a6831bcfaed029632d34812b7b7bebda01438c5e.tar.gz |
core.main: handle py3 encoding errors in --list-tagged-files
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/main.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py index 4c7c9482..319b248f 100644 --- a/ranger/core/main.py +++ b/ranger/core/main.py @@ -42,7 +42,10 @@ def main(): if arg.list_tagged_files: fm = FM() try: - f = open(fm.confpath('tagged'), 'r') + if sys.version_info[0] >= 3: + f = open(fm.confpath('tagged'), 'r', errors='replace') + else: + f = open(fm.confpath('tagged'), 'r') except: pass else: |