From feb6ed1f9bed4100d65b021de47cc6097fa976e2 Mon Sep 17 00:00:00 2001
From: Dalibor Pospisil <dapospis@redhat.com>
Date: Wed, 18 Jun 2014 11:46:20 +0200
Subject: [PATCH] fir for python compat on RHEL5
---
src/python/bstor.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/python/bstor.py b/src/python/bstor.py
index 04d4dfd..a512795 100755
--- a/src/python/bstor.py
+++ b/src/python/bstor.py
@@ -36,8 +36,9 @@ class Storage(object):
def __save_file(self, parser):
fpath = os.path.join(self.__obtain_dir(), self.namespace)
- with open(fpath, 'w') as cfile:
- parser.write(cfile)
+ cfile = open(fpath, 'w')
+ parser.write(cfile)
+ cfile.close()
def get(self, key):
parser = self.__obtain_file()
--
1.9.3