mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Only three failing tests left: dbm, gdbm, tcl!
This commit is contained in:
parent
cef3a1c146
commit
6e23e3796d
2 changed files with 4 additions and 4 deletions
|
@ -132,9 +132,9 @@ class dircmp:
|
||||||
def phase1(self): # Compute common names
|
def phase1(self): # Compute common names
|
||||||
a = dict(izip(imap(os.path.normcase, self.left_list), self.left_list))
|
a = dict(izip(imap(os.path.normcase, self.left_list), self.left_list))
|
||||||
b = dict(izip(imap(os.path.normcase, self.right_list), self.right_list))
|
b = dict(izip(imap(os.path.normcase, self.right_list), self.right_list))
|
||||||
self.common = map(a.__getitem__, ifilter(b.has_key, a))
|
self.common = map(a.__getitem__, ifilter(b.__contains__, a))
|
||||||
self.left_only = map(a.__getitem__, ifilterfalse(b.has_key, a))
|
self.left_only = map(a.__getitem__, ifilterfalse(b.__contains__, a))
|
||||||
self.right_only = map(b.__getitem__, ifilterfalse(a.has_key, b))
|
self.right_only = map(b.__getitem__, ifilterfalse(a.__contains__, b))
|
||||||
|
|
||||||
def phase2(self): # Distinguish files, directories, funnies
|
def phase2(self): # Distinguish files, directories, funnies
|
||||||
self.common_dirs = []
|
self.common_dirs = []
|
||||||
|
|
|
@ -31,7 +31,7 @@ class LogReader:
|
||||||
self._reader = _hotshot.logreader(logfn)
|
self._reader = _hotshot.logreader(logfn)
|
||||||
self._nextitem = self._reader.next
|
self._nextitem = self._reader.next
|
||||||
self._info = self._reader.info
|
self._info = self._reader.info
|
||||||
if self._info.has_key('current-directory'):
|
if 'current-directory' in self._info:
|
||||||
self.cwd = self._info['current-directory']
|
self.cwd = self._info['current-directory']
|
||||||
else:
|
else:
|
||||||
self.cwd = None
|
self.cwd = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue