[Libreoffice] Rewiew needed for pythonscript.py patch (new try)
serv serva
serval2412 at yahoo.fr
Mon Mar 14 05:56:16 PDT 2011
Hello,
I added this because of a warning (error) with pychecker.
On the contrary of the other blocks, the variable uri "wasn't" declared and initialized whereas it was used in this block.
But perhaps I misunderstood, I don't know Python.
python -tt <filename> or pychecker <filename> didn't complain after this add.
Are there other ways to check that everything is ok so I'll use them next time ?
Julien.
--- En date de : Lun 14.3.11, Caolán McNamara <caolanm at redhat.com> a écrit :
> De: Caolán McNamara <caolanm at redhat.com>
> Objet: Re: [Libreoffice] Rewiew needed for pythonscript.py patch (new try)
> À: "Julien Nabet" <serval2412 at yahoo.fr>
> Cc: "Christian Lohmaier" <lohmaier+libreoffice at googlemail.com>, libreoffice at lists.freedesktop.org
> Date: Lundi 14 mars 2011, 13h36
> On Sat, 2011-03-12 at 23:43 +0100,
> Julien Nabet wrote:
> > And now, ladies and gentlemen, the patch ! :-)
>
> Why the addition of a "uri = expandUri( name )" into
> replaceByName ?,
> i.e. this hunk
>
> @@ -962,8 +964,9 @@ class PythonScriptProvider(
> unohelper.Base,
> XBrowseNode, XScriptProvider, XNameC
>
> def replaceByName( self, name,
> value ):
> ...
> - removeByName( name )
> - insertByName( name )
> + uri = expandUri( name )
> + self.removeByName( name )
> + self.insertByName( name, value
> )
> ...
>
> C.
>
>
More information about the LibreOffice
mailing list