From cdc1245960167b6c474e014c2fa22edecd1ea9ff Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Tue, 30 Apr 2013 17:43:48 +0200 Subject: [PATCH] - pass a str to exec() instead of an open file object An open file object isn't supported anymore by python3. This fixes issue #26. --- osc/commandline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index 8db89bf8..0b028456 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -7859,7 +7859,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. if not extfile.endswith('.py'): continue try: - exec(open(os.path.join(plugin_dir, extfile))) + exec(open(os.path.join(plugin_dir, extfile)).read()) except SyntaxError as e: if (os.environ.get('OSC_PLUGIN_FAIL_IGNORE')): print("%s: %s\n" % (plugin_dir, e), file=sys.stderr)