summaryrefslogtreecommitdiffstats
path: root/obmc/dbuslib/propertycacher.py
diff options
context:
space:
mode:
Diffstat (limited to 'obmc/dbuslib/propertycacher.py')
-rw-r--r--obmc/dbuslib/propertycacher.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/obmc/dbuslib/propertycacher.py b/obmc/dbuslib/propertycacher.py
index 701a413..ce83195 100644
--- a/obmc/dbuslib/propertycacher.py
+++ b/obmc/dbuslib/propertycacher.py
@@ -29,8 +29,11 @@ def getCacheFilename(obj_path, iface_name):
def save(obj_path, iface_name, properties):
print "Caching: "+obj_path
+ filename = getCacheFilename(obj_path, iface_name)
+ parent = os.path.dirname(filename)
try:
- filename = getCacheFilename(obj_path, iface_name)
+ if not os.path.exists(parent):
+ os.makedirs(parent)
output = open(filename, 'wb')
try:
## use json module to convert dbus datatypes
OpenPOWER on IntegriCloud