[PyKDE] DCOPExObj bug?
Danny Pansters
danny at ricin.com
Thu Dec 1 22:25:47 GMT 2005
On Thursday 1 December 2005 00:57, Jim Bublitz wrote:
> On Wednesday 30 November 2005 15:41, Danny Pansters wrote:
<SNIP>
> > Using kdcop and the dcop CLI, it seems that although the methods are
> > executed alright, kdcop complains: "DCOP call failed. Application is
> > still registered with DCOP; I do not know why this call failed." And on
> > the console:
> >
> > Traceback (most recent call last):
> > File "/usr/local/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
> >
> > When trying with example_decopexport.py the same happens with the set
> > method (the gets work OK), e.g.
> >
> > %dcop petshop-46787 "dead parrot" setParrotType "Big Bird"
> > call failed
> > %dcop petshop-46787 "dead parrot" getParrotType
> > Big Bird
<SNIP>
> The easiet fix is in dcopexport.py. Insert the # marked if statement at
> line 88 and indent the block beginning with "s ="
>
> #marshall the result as 'replyData'
> if self.method.rtype != "void": ######
> s = QDataStream (replyData, IO_WriteOnly)
> if self.method.rtype in numericTypes:
> dcop_add (s, result, self.method.rtype)
> elif self.method.rtype in stringTypes and isinstance (result, str):
> dcop_add (s, eval ("%s('''%s''')" % (self.method.rtype, result)))
> 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)
>
> That works for me - let me know if it works for you.
>
> Jim
Yup, that works :) I'll add this as a patch to the FreeBSD port I maintain (it
uses the 1013 snapshot).
Thanks!
More information about the PyQt
mailing list