Put finally: in their own block for Python 2.4
This commit is contained in:
parent
8fd22efed2
commit
84658d4ea4
9
setup.py
9
setup.py
|
@ -74,10 +74,11 @@ class Uninstall(Command):
|
|||
def run(self):
|
||||
self.ensure_filename('manifest')
|
||||
try:
|
||||
f = open(self.manifest)
|
||||
files = [file.strip() for file in f]
|
||||
except IOError, e:
|
||||
raise DistutilsFileError("unable to open install manifest: %s", str(e))
|
||||
try:
|
||||
f = open(self.manifest)
|
||||
files = [file.strip() for file in f]
|
||||
except IOError, e:
|
||||
raise DistutilsFileError("unable to open install manifest: %s", str(e))
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
|
|
|
@ -167,10 +167,11 @@ class ConfigFile:
|
|||
def _line_ok(self):
|
||||
if self._currvalue is None: return
|
||||
else:
|
||||
try:
|
||||
self.callback(self._currsection, self._currsetting, self._currvalue)
|
||||
except ValueError, e:
|
||||
raise ConfigSyntaxError(str(e), self)
|
||||
try: # *glares at 2.4 users*
|
||||
try:
|
||||
self.callback(self._currsection, self._currsetting, self._currvalue)
|
||||
except ValueError, e:
|
||||
raise ConfigSyntaxError(str(e), self)
|
||||
finally:
|
||||
self._currvalue = None
|
||||
|
||||
|
|
Loading…
Reference in New Issue