Review Request 114314: Fix traceback in Python runner plugins
Commit Hook
null at kde.org
Fri Dec 6 09:12:07 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114314/#review45249
-----------------------------------------------------------
This review has been submitted with commit 8c5902e49b6387c3c2e82c475ff5a1f491da7604 by Harald Sitter to branch KDE/4.11.
- Commit Hook
On Dec. 5, 2013, 11:11 a.m., Harald Sitter wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114314/
> -----------------------------------------------------------
>
> (Updated Dec. 5, 2013, 11:11 a.m.)
>
>
> Review request for kde-workspace and KDE Bindings.
>
>
> Bugs: https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/1258088
> http://bugs.kde.org/show_bug.cgi?id=https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/1258088
>
>
> Repository: kde-workspace
>
>
> Description
> -------
>
> 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
> pyrunner.py 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/pyrunner.py", line 90, in reloadConfiguration
> self.pyrunner.reloadConfiguration()
>
> To prevent this from happening the functions now have the implicit self
> argument.
>
> Also see:
> https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/1258088
>
> CCMAIL: 1258088 at bugs.launchpad.net
>
>
> Diffs
> -----
>
> plasma/generic/scriptengines/python/plasmascript.py 0ec38eb826cd8b7a052ed47081d05a3b644b03d1
>
> Diff: http://git.reviewboard.kde.org/r/114314/diff/
>
>
> Testing
> -------
>
> 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)
>
>
> Thanks,
>
> Harald Sitter
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131206/5435a4f7/attachment.htm>
-------------- next part --------------
_______________________________________________
Kde-bindings mailing list
Kde-bindings at kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
More information about the kde-core-devel
mailing list