summaryrefslogtreecommitdiff
path: root/tools/deploystatic/deploystatic.py
diff options
context:
space:
mode:
authorMagnus Hagander2018-12-15 10:05:34 +0000
committerMagnus Hagander2018-12-15 10:05:34 +0000
commitd3cbef33ecc739a7fea78ab21ea097178c204f91 (patch)
treeb56248a4d520e13197491b53eb0b3feec2d0e3b6 /tools/deploystatic/deploystatic.py
parentf01500dcf70022e2d23b91c147a6254ac8c4e3b2 (diff)
Replace usage of has_key()
It has been deprecated, and instead we should use "in" and "not in", so make that change across the board.
Diffstat (limited to 'tools/deploystatic/deploystatic.py')
-rwxr-xr-xtools/deploystatic/deploystatic.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/deploystatic/deploystatic.py b/tools/deploystatic/deploystatic.py
index 31260652..2ea1e417 100755
--- a/tools/deploystatic/deploystatic.py
+++ b/tools/deploystatic/deploystatic.py
@@ -118,13 +118,13 @@ class TarWrapper(object):
self.tarstruct[m.name] = m
def isdir(self, d):
- return self.tarstruct.has_key(d) and self.tarstruct[d].isdir()
+ return d in self.tarstruct and self.tarstruct[d].isdir()
def isfile(self, f):
- return self.tarstruct.has_key(f) and self.tarstruct[f].isfile()
+ return f in self.tarstruct and self.tarstruct[f].isfile()
def readfile(self, src):
- if self.tarstruct.has_key(src) and self.tarstruct[src].isfile():
+ if src in self.tarstruct and self.tarstruct[src].isfile():
return self.tarfile.extractfile(src).read()
else:
return None