Mercurial > hg > configuration
diff configuration/configuration.py @ 110:b9fdae6a536a
make python 2.4 compatible :(
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 10 May 2012 15:23:11 -0700 |
parents | 09642528be02 |
children | cbd0f0aea3e5 |
line wrap: on
line diff
--- a/configuration/configuration.py Thu May 03 16:00:18 2012 -0700 +++ b/configuration/configuration.py Thu May 10 15:23:11 2012 -0700 @@ -65,12 +65,15 @@ else: f = filename newfile = False + exception = None try: self._write(f, config) - finally: - # XXX try: finally: works in python >= 2.5 - if newfile: - f.close() + except Exception, exception: + pass + if newfile: + f.close() + if exception: + raise exception def _write(self, fp, config): raise NotImplementedError("Abstract base class")