File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,9 @@ def phase0(self): # Compare everything except common subdirectories
132132 def phase1 (self ): # Compute common names
133133 a = dict (izip (imap (os .path .normcase , self .left_list ), self .left_list ))
134134 b = dict (izip (imap (os .path .normcase , self .right_list ), self .right_list ))
135- self .common = map (a .__getitem__ , ifilter (b .has_key , a ))
136- self .left_only = map (a .__getitem__ , ifilterfalse (b .has_key , a ))
137- self .right_only = map (b .__getitem__ , ifilterfalse (a .has_key , b ))
135+ self .common = map (a .__getitem__ , ifilter (b .__contains__ , a ))
136+ self .left_only = map (a .__getitem__ , ifilterfalse (b .__contains__ , a ))
137+ self .right_only = map (b .__getitem__ , ifilterfalse (a .__contains__ , b ))
138138
139139 def phase2 (self ): # Distinguish files, directories, funnies
140140 self .common_dirs = []
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def __init__(self, logfn):
3131 self ._reader = _hotshot .logreader (logfn )
3232 self ._nextitem = self ._reader .next
3333 self ._info = self ._reader .info
34- if self . _info . has_key ( 'current-directory' ) :
34+ if 'current-directory' in self . _info :
3535 self .cwd = self ._info ['current-directory' ]
3636 else :
3737 self .cwd = None
You can’t perform that action at this time.
0 commit comments