Commits

Robert Brewer committed d0878d1

Bug in config-file parsing: needed try/finally: close block.

  • Participants
  • Parent commits a28bc5c
  • Branches cherrypy

Comments (0)

Files changed (1)

             # except IOError:
             #     continue
             fp = open(filename)
-            self._read(fp, filename)
-            fp.close()
+            try:
+                self._read(fp, filename)
+            finally:
+                fp.close()
 
 def dict_from_config_file(configFile):
     """ Convert an INI file to a dictionary. """