1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-08 22:18:43 +02:00

python 3 compatibility: exec

exec is no longer a statement
This commit is contained in:
Michal Vyskocil
2013-04-09 11:28:40 +02:00
committed by Adrian Schröter
parent 3a93ac6d10
commit 600a565428

View File

@@ -7840,7 +7840,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)))
except SyntaxError as e:
if (os.environ.get('OSC_PLUGIN_FAIL_IGNORE')):
print >>sys.stderr, "%s: %s\n" % (plugin_dir, e)