diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-02-14 19:14:11 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-02-14 19:14:11 +0100 |
commit | a06b9d3fcf62d9b225b5d3fbb830e3f241271985 (patch) | |
tree | ad60eaebbedde4ffbec1582d01ff701777b712ce /src | |
parent | specs for periodically (diff) | |
download | blueshift-a06b9d3fcf62d9b225b5d3fbb830e3f241271985.tar.gz blueshift-a06b9d3fcf62d9b225b5d3fbb830e3f241271985.tar.bz2 blueshift-a06b9d3fcf62d9b225b5d3fbb830e3f241271985.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/__main__.py | 10 |
1 files changed, 6 insertions, 4 deletions
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 |