mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-22 21:16:16 +01:00
Added 'env OSC_PLUGIN_FAIL_IGNORE=1 osc ...'
Otherwise a failing plugin prevents us from seeing even a usage.
This commit is contained in:
parent
02726a6a07
commit
feb731e3c0
@ -6670,6 +6670,17 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
for extfile in os.listdir(plugin_dir):
|
||||
if not extfile.endswith('.py'):
|
||||
continue
|
||||
exec open(os.path.join(plugin_dir, extfile))
|
||||
try:
|
||||
exec open(os.path.join(plugin_dir, extfile))
|
||||
except SyntaxError, e:
|
||||
if (os.environ.get('OSC_PLUGIN_FAIL_IGNORE')):
|
||||
print >>sys.stderr, "%s: %s\n" % (plugin_dir, e)
|
||||
else:
|
||||
import traceback
|
||||
traceback.print_exc(file=sys.stderr)
|
||||
print >>sys.stderr, '\n%s: %s' % (plugin_dir, e)
|
||||
print >>sys.stderr, "\n Try 'env OSC_PLUGIN_FAIL_IGNORE=1 osc ...'"
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# vim: sw=4 et
|
||||
|
Loading…
Reference in New Issue
Block a user