From ce99ab4010dee8f4a60844c004b2bddbcdfe5dec Mon Sep 17 00:00:00 2001 From: Daniel Firth Date: Fri, 20 Dec 2013 15:47:25 +0000 Subject: LocalArtifactCache now takes a an FS object --- morphlib/util.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'morphlib/util.py') diff --git a/morphlib/util.py b/morphlib/util.py index 90ad425e..68aed608 100644 --- a/morphlib/util.py +++ b/morphlib/util.py @@ -17,6 +17,8 @@ import itertools import os import re +import fs.osfs + import morphlib '''Utility functions for morph.''' @@ -118,13 +120,13 @@ def new_artifact_caches(settings): # pragma: no cover if not os.path.exists(artifact_cachedir): os.mkdir(artifact_cachedir) - lac = morphlib.localartifactcache.LocalArtifactCache(artifact_cachedir) + lac = morphlib.localartifactcache.LocalArtifactCache( + fs.osfs.OSFS(artifact_cachedir)) rac_url = get_artifact_cache_server(settings) + rac = None if rac_url: rac = morphlib.remoteartifactcache.RemoteArtifactCache(rac_url) - else: - rac = None return lac, rac -- cgit v1.2.1