diff --git a/osc/commandline.py b/osc/commandline.py index c31d2e14..ff6425ee 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -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')):