From a6831bcfaed029632d34812b7b7bebda01438c5e Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 5 Dec 2015 04:13:52 +0100 Subject: core.main: handle py3 encoding errors in --list-tagged-files --- ranger/core/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- cgit 1.4.1-2-gfad0