Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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@redhat.com> a écrit :

De: Caolán McNamara <caolanm@redhat.com>
Objet: Re: [Libreoffice] Rewiew needed for pythonscript.py patch (new try)
À: "Julien Nabet" <serval2412@yahoo.fr>
Cc: "Christian Lohmaier" <lohmaier+libreoffice@googlemail.com>, libreoffice@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.






Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.