This commit is contained in:
deflax 2016-11-03 06:08:43 +02:00
parent 18b2ee383c
commit 57dfc8f8ba

View file

@ -29,9 +29,9 @@ def querydb(cubeid):
""" open a metadata file """
try:
dbfile = 'db/vm.{}.json'.format(src_data['cube'])
with open(dbfile as datafile):
data = json.load(datafile)
datafile.close()
with open(dbfile, 'r' as dbf):
data = json.load(dbf)
dbf.close()
logger.info('grid> {} --> {}'.format(dbfile, data))
except Exception as e:
logger.critical('grid> {}'.format(e))