[Libreoffice-commits] .: scripting/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Dec 9 11:07:14 PST 2012
scripting/source/pyprov/pythonscript.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 7914f867139c06fd751f6e37c9ed3e563388ed62
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Dec 9 10:55:46 2012 +0100
Python: fix deprecated + "== None" instead of "is None"
Change-Id: Ic19c2ac5817cf5f6359bccda14795ec4f17aad7e
Reviewed-on: https://gerrit.libreoffice.org/1275
Reviewed-by: Tomáš Chvátal <tchvatal at suse.cz>
Tested-by: Tomáš Chvátal <tchvatal at suse.cz>
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index dcf05d4..dbc5725 100755
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -328,7 +328,7 @@ class ProviderContext:
packageName = self.getPackageNameFromUrl( url )
transientPart = self.getTransientPartFromUrl( url )
log.isDebugLevel() and log.debug( "addPackageByUrl : " + packageName + ", " + transientPart + "("+url+")" + ", rootUrl="+self.rootUrl )
- if self.mapPackageName2Path.has_key( packageName ):
+ if packageName in self.mapPackageName2Path:
package = self.mapPackageName2Path[ packageName ]
package.pathes = package.pathes + (url, )
else:
@@ -380,7 +380,7 @@ class ProviderContext:
allFuncs = []
- if code == None:
+ if code is None:
return allFuncs
g_exportedScripts = []
More information about the Libreoffice-commits
mailing list