[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] [PATCH] Fix void dcop calls
From: Sebastian =?utf-8?q?K=C3=BCgler?= <sebas () kde ! org>
Date: 2006-08-23 21:43:30
Message-ID: 200608232343.34812.sebas () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
Attached patch makes calls such as
self.addMethod ('void foo ()', app.foo)
work. Without it, the call fails, since dcop_add does not accept None as
second argument. dcop-testapp.py is a minimal testcase:
---SNIP---
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/dcopexport.py", line 96, in process
dcop_add (s, result)
TypeError: argument 2 of dcop_add() has an invalid type
---SNIP---
Did I do something wrong? If not, can this one be merged?
--
sebas
http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you want the holes in your knowledge showing up try teaching someone. -
Alan Cox
["dcopexport-fix-void-methods.diff" (text/x-diff)]
--- dcopexport.py.orig 2006-08-23 23:27:24.000000000 +0200
+++ dcopexport.py 2006-08-23 23:27:51.000000000 +0200
@@ -93,7 +93,10 @@
elif self.method.rtype.startswith ("QMap") or self.method.rtype.startswith ("QValueList"):
dcop_add (params, args [i], self.argtypes [i])
else:
- dcop_add (s, result)
+ if not result:
+ dcop_add (s, "")
+ else:
+ dcop_add (s, result)
# use append because we want to return the replyType reference,
# not a new QCString
["dcop-testapp.py" (application/x-python)]
[Attachment #9 (application/pgp-signature)]
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic