From 96a39dae1262cb61ef7cb80d266900ba3b241fa9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 20 Feb 2014 02:05:02 +0100 Subject: fix -c bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/__main__.py b/src/__main__.py index f08520f..3e66cca 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -364,10 +364,10 @@ else: conf_opts = [config_file] + parser.files if config_file is not None: code = None - with open(file, 'rb') as script: + with open(config_file, 'rb') as script: code = script.read() code = code.decode('utf8', 'error') + '\n' - code = compile(code, file, 'exec') + code = compile(code, config_file, 'exec') g, l = globals(), dict(locals()) for key in l: g[key] = l[key] -- cgit v1.2.3-70-g09d2