Skip to content

Commit ba1fffa

Browse files
committed
Make it work with Py3k.
1 parent 3add4d7 commit ba1fffa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tools/scripts/dutree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def main():
2525
def store(size, comps, total, d):
2626
if comps == []:
2727
return size, d
28-
if not d.has_key(comps[0]):
28+
if comps[0] not in d:
2929
d[comps[0]] = None, {}
3030
t1, d1 = d[comps[0]]
3131
d[comps[0]] = store(size, comps[1:], t1, d1)
@@ -53,7 +53,7 @@ def show(total, d, prefix):
5353
else:
5454
print(prefix + repr(tsub).rjust(width) + ' ' + key)
5555
psub = prefix + ' '*(width-1) + '|' + ' '*(len(key)+1)
56-
if d.has_key(key):
56+
if key in d:
5757
show(tsub, d[key][1], psub)
5858

5959
if __name__ == '__main__':

0 commit comments

Comments
 (0)