xls-report.py: don't eat all errors when reading sheet.conf

This commit is contained in:
Roman Donchenko 2013-07-04 18:03:03 +04:00
parent a2d576c1bb
commit 83fd385bbd

@ -67,6 +67,7 @@
from __future__ import division from __future__ import division
import ast import ast
import errno
import fnmatch import fnmatch
import logging import logging
import numbers import numbers
@ -176,7 +177,8 @@ def main():
try: try:
with open(os.path.join(sheet_path, 'sheet.conf')) as sheet_conf_file: with open(os.path.join(sheet_path, 'sheet.conf')) as sheet_conf_file:
sheet_conf = ast.literal_eval(sheet_conf_file.read()) sheet_conf = ast.literal_eval(sheet_conf_file.read())
except Exception: except IOError as ioe:
if ioe.errno != errno.ENOENT: raise
sheet_conf = {} sheet_conf = {}
logging.debug('no sheet.conf for %s', sheet_path) logging.debug('no sheet.conf for %s', sheet_path)