From 787df51239ffa8260b48d6a3a58e6ff07d5e0f64 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sun, 12 Sep 2021 16:42:47 -0700 Subject: [PATCH] remove `\n` from end of line in exception message --- jc/parsers/ls_s.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jc/parsers/ls_s.py b/jc/parsers/ls_s.py index c935e97f..839a00e3 100644 --- a/jc/parsers/ls_s.py +++ b/jc/parsers/ls_s.py @@ -171,7 +171,7 @@ def parse(data, raw=False, quiet=False): # Only support -l option if not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', line): - raise ParseError(f'Unparsable line: {line[0:60]}') + raise ParseError(f'Unparsable line: {line.rstrip()[0:60]}') # split filenames and links if len(parsed_line) == 9: