From b220d6d36aa6b215dba11b67462107dbce41308c Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Sat, 7 Nov 2015 11:39:59 +0100 Subject: [PATCH] Improve exception type --- patacrep/encoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patacrep/encoding.py b/patacrep/encoding.py index 9f0018da..d38daf60 100644 --- a/patacrep/encoding.py +++ b/patacrep/encoding.py @@ -43,4 +43,4 @@ def detect_encoding(filename): finally: filehandler.close() - raise Exception('Not suitable encoding found for {}'.format(filename)) + raise UnicodeDecodeError('Not suitable encoding found for {}'.format(filename))