mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-23 05:26:16 +01:00
- _load_plugins: follow-up fix for commit 58d716a6f7
Only add functions to the Osc class which are defined in the _current_ module.
This commit is contained in:
parent
12ffb4e3c4
commit
67a0671c8a
@ -7984,9 +7984,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
mod.__dict__.update(globals())
|
||||
for name in dir(mod):
|
||||
func = getattr(mod, name)
|
||||
# add all functions to the class (filtering only
|
||||
# methods which start with "do_" breaks the old behavior)
|
||||
if inspect.isfunction(func):
|
||||
# add all functions (which are defined in the imported module)
|
||||
# to the class (filtering only methods which start with "do_"
|
||||
# breaks the old behavior)
|
||||
if inspect.isfunction(func) and inspect.getmodule(func) == mod:
|
||||
setattr(self.__class__, name, func)
|
||||
except SyntaxError as e:
|
||||
if (os.environ.get('OSC_PLUGIN_FAIL_IGNORE')):
|
||||
|
Loading…
Reference in New Issue
Block a user