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

- _load_plugins: add all functions from the plugin to the Osc class

Adding only functions which starts with "do_" breaks the old
behavior.
This commit is contained in:
Marcus Huewe 2013-06-26 10:18:14 +02:00
parent 4996b1d1ac
commit 58d716a6f7

View File

@ -7928,7 +7928,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
mod.__dict__.update(globals())
for name in dir(mod):
func = getattr(mod, name)
if name.startswith('do_') and inspect.isfunction(func):
# add all functions to the class (filtering only
# methods which start with "do_" breaks the old behavior)
if inspect.isfunction(func):
setattr(self.__class__, name, func)
except SyntaxError as e:
if (os.environ.get('OSC_PLUGIN_FAIL_IGNORE')):