summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py
index 64c260e9..7406e19f 100644
--- a/cloudinit/__init__.py
+++ b/cloudinit/__init__.py
@@ -153,6 +153,7 @@ class CloudInit:
cache = get_ipath_cur('obj_pkl')
f=open(cache, "rb")
data = cPickle.load(f)
+ f.close()
self.datasource = data
return True
except:
@@ -169,6 +170,7 @@ class CloudInit:
try:
f=open(cache, "wb")
data = cPickle.dump(self.datasource,f)
+ f.close()
os.chmod(cache,0400)
return True
except: