mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-02 17:56:15 +01:00
- handle ImportError of a plugin more gracefully
See bnc#876538 for the details.
This commit is contained in:
parent
5a65b06927
commit
474dcf6843
@ -8206,7 +8206,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
if (inspect.isfunction(data) and inspect.getmodule(data) == mod
|
if (inspect.isfunction(data) and inspect.getmodule(data) == mod
|
||||||
or inspect.ismodule(data)):
|
or inspect.ismodule(data)):
|
||||||
setattr(self.__class__, name, data)
|
setattr(self.__class__, name, data)
|
||||||
except (SyntaxError, NameError) as e:
|
except (SyntaxError, NameError, ImportError) as e:
|
||||||
if (os.environ.get('OSC_PLUGIN_FAIL_IGNORE')):
|
if (os.environ.get('OSC_PLUGIN_FAIL_IGNORE')):
|
||||||
print("%s: %s\n" % (os.path.join(plugin_dir, extfile), e), file=sys.stderr)
|
print("%s: %s\n" % (os.path.join(plugin_dir, extfile), e), file=sys.stderr)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user