summaryrefslogtreecommitdiffstats
path: root/ext/python/Tools
diff options
context:
space:
mode:
authorChristoph Erhardt <kolab@sicherha.de>2021-06-05 11:51:27 +0200
committerChristoph Erhardt <kolab@sicherha.de>2022-01-10 20:50:41 +0100
commit9a5f92139d3fbe7fa1945d38198a9cdc74831ac5 (patch)
tree03fff0f479a90dfaa70c6647dd0923086560dcca /ext/python/Tools
parentc3b9d5557161f840a8f2c45fc91ec09299593dd9 (diff)
downloadpykolab-9a5f92139d3fbe7fa1945d38198a9cdc74831ac5.tar.gz
[Python 3] Get rid of .has_key()
Summary: `dict.has_key(key)` was dropped in Python 3.0. Use `key in dict` instead. Reviewers: machniak, mollekopf Reviewed By: mollekopf Differential Revision: https://git.kolab.org/D3241
Diffstat (limited to 'ext/python/Tools')
-rw-r--r--ext/python/Tools/freeze/checkextensions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/python/Tools/freeze/checkextensions.py b/ext/python/Tools/freeze/checkextensions.py
index 078f5d7..abffe18 100644
--- a/ext/python/Tools/freeze/checkextensions.py
+++ b/ext/python/Tools/freeze/checkextensions.py
@@ -18,7 +18,7 @@ def checkextensions(unknown, extensions):
for mod in unknown:
for e in extensions:
(mods, vars), liba = edict[e]
- if not mods.has_key(mod):
+ if mod not in mods:
continue
modules.append(mod)
if liba:
@@ -84,7 +84,7 @@ def expandvars(str, vars):
break
var = str[i:j]
i = j+1
- if vars.has_key(var):
+ if var in vars:
str = str[:k] + vars[var] + str[i:]
i = k
return str