summaryrefslogtreecommitdiff
path: root/morphlib/cachedir.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2011-12-12 14:16:00 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2011-12-12 14:16:00 +0000
commitd655eb0e7f6d454df9e2669143035db7fa6f38d4 (patch)
treea290b21319ed059e2a45eca0550128cfa32d3ca9 /morphlib/cachedir.py
parent478a0997c147ee717f7c731d6fc1224b5be8b8f8 (diff)
downloadmorph-d655eb0e7f6d454df9e2669143035db7fa6f38d4.tar.gz
Fix Cachedir to convert relative paths to absolute paths
This also required a test to be changed as it assumed that the path it created the Cachedir with was the same one it stored. It also technically makes the new test redundant as testing if dirname is equal to an absolute path also tests if it retrieves values by absolute path.
Diffstat (limited to 'morphlib/cachedir.py')
-rw-r--r--morphlib/cachedir.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/cachedir.py b/morphlib/cachedir.py
index e5f5f419..803c4359 100644
--- a/morphlib/cachedir.py
+++ b/morphlib/cachedir.py
@@ -23,7 +23,7 @@ class CacheDir(object):
'''Manage Baserock cached binaries.'''
def __init__(self, dirname):
- self.dirname = dirname
+ self.dirname = os.path.abspath(dirname)
def key(self, dict_key):
'''Create a string key from a dictionary key.