mirror of https://github.com/python/cpython
Fix more unbound locals in code paths that do not seem to be used.
This commit is contained in:
parent
bd564c3c21
commit
cd4a21bb8e
|
@ -17,8 +17,9 @@ class SortedDict(UserDict.UserDict):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def values(self):
|
def values(self):
|
||||||
|
# XXX never used?
|
||||||
result = self.items()
|
result = self.items()
|
||||||
return [i[1] for i in values]
|
return [i[1] for i in result]
|
||||||
|
|
||||||
def iteritems(self): return iter(self.items())
|
def iteritems(self): return iter(self.items())
|
||||||
def iterkeys(self): return iter(self.keys())
|
def iterkeys(self): return iter(self.keys())
|
||||||
|
|
|
@ -1456,12 +1456,13 @@ class MinidomTest(unittest.TestCase):
|
||||||
self.confirm(len(n1.entities) == len(n2.entities)
|
self.confirm(len(n1.entities) == len(n2.entities)
|
||||||
and len(n1.notations) == len(n2.notations))
|
and len(n1.notations) == len(n2.notations))
|
||||||
for i in range(len(n1.notations)):
|
for i in range(len(n1.notations)):
|
||||||
|
# XXX this loop body doesn't seem to be executed?
|
||||||
no1 = n1.notations.item(i)
|
no1 = n1.notations.item(i)
|
||||||
no2 = n1.notations.item(i)
|
no2 = n1.notations.item(i)
|
||||||
self.confirm(no1.name == no2.name
|
self.confirm(no1.name == no2.name
|
||||||
and no1.publicId == no2.publicId
|
and no1.publicId == no2.publicId
|
||||||
and no1.systemId == no2.systemId)
|
and no1.systemId == no2.systemId)
|
||||||
statck.append((no1, no2))
|
stack.append((no1, no2))
|
||||||
for i in range(len(n1.entities)):
|
for i in range(len(n1.entities)):
|
||||||
e1 = n1.entities.item(i)
|
e1 = n1.entities.item(i)
|
||||||
e2 = n2.entities.item(i)
|
e2 = n2.entities.item(i)
|
||||||
|
|
|
@ -182,8 +182,10 @@ class PlatformTest(unittest.TestCase):
|
||||||
if os.path.isdir(sys.executable) and \
|
if os.path.isdir(sys.executable) and \
|
||||||
os.path.exists(sys.executable+'.exe'):
|
os.path.exists(sys.executable+'.exe'):
|
||||||
# Cygwin horror
|
# Cygwin horror
|
||||||
executable = executable + '.exe'
|
executable = sys.executable + '.exe'
|
||||||
res = platform.libc_ver(sys.executable)
|
else:
|
||||||
|
executable = sys.executable
|
||||||
|
res = platform.libc_ver(executable)
|
||||||
|
|
||||||
def test_parse_release_file(self):
|
def test_parse_release_file(self):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue