Review Request 114314: Fix traceback in Python runner plugins

Harald Sitter sitter at
Fri Dec 6 09:12:10 GMT 2013

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 6, 2013, 9:12 a.m.)


This change has been marked as submitted.

Review request for kde-workspace and KDE Bindings.


Repository: kde-workspace


Plamascript.Runner is the base of python krunner plugins. These plugins
implement the C++ signals prepare, teardown, createRunOptions and
reloadConfiguration in actual methods (the signal wiring happens in which is the loading component). As a result of this calls
to any of these methods will fall through to plasmascript.Runner whenever
the actual runner does not implement them. However plasmascript.Runner is
missing the implicit 'self' argument such that one gets silly python
backtraces like

File "/usr/share/kde4/apps/plasma_scriptengine_python/", line 90, in reloadConfiguration

To prevent this from happening the functions now have the implicit self

Also see:

CCMAIL: 1258088 at


  plasma/generic/scriptengines/python/ 0ec38eb826cd8b7a052ed47081d05a3b644b03d1 



Simple runner plugin only implementing match, run and reloadConfiguration, each is called and no exceptions are thrown WRT attribute errors.

from PyKDE4 import plasmascript
from PyKDE4.plasma import Plasma
from PyKDE4.kdeui import KIcon

class KittehRunner(plasmascript.Runner):

    def match(self, context):
        print "match"

    def run(self, context, match):
        print "run"

    def reloadConfiguration(self):
        print "reloadConfig"

def CreateRunner(parent):
    return KittehRunner(parent)


Harald Sitter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list