From 663da9ca37bd4292d292919ec6e3f10e663d13ab Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Thu, 17 Dec 2015 19:52:58 +0200 Subject: Don't use encoding in the except branch, since it's not defined. --- astroid/builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'astroid/builder.py') diff --git a/astroid/builder.py b/astroid/builder.py index 47aee988..7eed55fa 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -129,8 +129,8 @@ class AstroidBuilder(raw_building.InspectBuilder): except UnicodeError: # wrong encoding # detect_encoding returns utf-8 if no encoding specified util.reraise(exceptions.AstroidBuildingError( - 'Wrong ({encoding}) or no encoding specified for {filename}.', - encoding=encoding, filename=path)) + 'Wrong or no encoding specified for {filename}.', + filename=path)) with stream: # get module name if necessary if modname is None: -- cgit v1.2.1