1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-22 21:16:16 +01:00

- 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.
This commit is contained in:
Marcus Huewe 2013-04-30 17:43:48 +02:00
parent 0c0ffe50fb
commit cdc1245960

View File

@ -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)