Commit 2f691967 authored by Tres Seaver's avatar Tres Seaver

Close opened-file leak in blob cache size check.

Closes #27.
parent 50692664
...@@ -1692,8 +1692,8 @@ def _check_blob_cache_size(blob_dir, target): ...@@ -1692,8 +1692,8 @@ def _check_blob_cache_size(blob_dir, target):
logger = logging.getLogger(__name__+'.check_blob_cache') logger = logging.getLogger(__name__+'.check_blob_cache')
layout = open(os.path.join(blob_dir, ZODB.blob.LAYOUT_MARKER) with open(os.path.join(blob_dir, ZODB.blob.LAYOUT_MARKER)) as layout_file:
).read().strip() layout = layout_file.read().strip()
if not layout == 'zeocache': if not layout == 'zeocache':
logger.critical("Invalid blob directory layout %s", layout) logger.critical("Invalid blob directory layout %s", layout)
raise ValueError("Invalid blob directory layout", layout) raise ValueError("Invalid blob directory layout", layout)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment