summaryrefslogtreecommitdiff
path: root/scripting/source/pyprov/pythonscript.py
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-12-09 10:55:46 +0100
committerTomáš Chvátal <tchvatal@suse.cz>2012-12-09 19:06:55 +0000
commit7914f867139c06fd751f6e37c9ed3e563388ed62 (patch)
tree22c5130e04e8bd6ef74a5123dce458c14a00618a /scripting/source/pyprov/pythonscript.py
parentf09841cf73f129bb85c870888f9e1215ae99bf83 (diff)
Python: fix deprecated + "== None" instead of "is None"
Change-Id: Ic19c2ac5817cf5f6359bccda14795ec4f17aad7e Reviewed-on: https://gerrit.libreoffice.org/1275 Reviewed-by: Tomáš Chvátal <tchvatal@suse.cz> Tested-by: Tomáš Chvátal <tchvatal@suse.cz>
Diffstat (limited to 'scripting/source/pyprov/pythonscript.py')
-rwxr-xr-xscripting/source/pyprov/pythonscript.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index dcf05d4f9b7c..dbc5725ea19d 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 = []