summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-14 19:14:11 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-14 19:14:11 +0100
commita06b9d3fcf62d9b225b5d3fbb830e3f241271985 (patch)
treead60eaebbedde4ffbec1582d01ff701777b712ce
parentspecs for periodically (diff)
downloadblueshift-a06b9d3fcf62d9b225b5d3fbb830e3f241271985.tar.gz
blueshift-a06b9d3fcf62d9b225b5d3fbb830e3f241271985.tar.bz2
blueshift-a06b9d3fcf62d9b225b5d3fbb830e3f241271985.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rwxr-xr-xsrc/__main__.py10
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