From a06b9d3fcf62d9b225b5d3fbb830e3f241271985 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 14 Feb 2014 19:14:11 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/__main__.py b/src/__main__.py index d6ae045..ab93e6e 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -68,11 +68,13 @@ for file in ('$XDG_CONFIG_HOME/%/%rc', '$HOME/.config/%/%rc', '$HOME/.%rc', '/et if file is not None: file = file.replace('\0', '$') if os.path.exists(file): + code = None with open(file, 'rb') as script: - code = script.read().decode('utf8', 'error') + '\n' - code = compile(code, file, 'exec') - exec(code, globals) - break + code = script.read() + code = code.decode('utf8', 'error') + '\n' + code = compile(code, file, 'exec') + exec(code, globals) + break ## Translate curve from float to integer -- cgit v1.2.3-70-g09d2