From 57dfc8f8bac512d7be0c06b866894be214a07725 Mon Sep 17 00:00:00 2001 From: deflax Date: Thu, 3 Nov 2016 06:08:43 +0200 Subject: [PATCH] phase3 --- grid.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grid.py b/grid.py index 6fd8f67..eb21878 100644 --- a/grid.py +++ b/grid.py @@ -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))