Reviewed-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
On 20/01/2015 06:45, lvroyce(a)linux.vnet.ibm.com wrote:
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/root.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/root.py b/src/kimchi/root.py
index 6f191eb..eb0ade7 100644
--- a/src/kimchi/root.py
+++ b/src/kimchi/root.py
@@ -120,8 +120,8 @@ class KimchiRoot(Root):
self.default_page = 'kimchi-ui.html'
for ident, node in sub_nodes.items():
setattr(self, ident, node(model))
- self.api_schema = json.load(open(os.path.join(paths.src_dir,
- 'API.json')))
+ with open(os.path.join(paths.src_dir, 'API.json')) as f:
+ self.api_schema = json.load(f)
self.paths = paths
self.domain = 'kimchi'
self.messages = messages