summaryrefslogtreecommitdiff
path: root/morphlib/util.py
diff options
context:
space:
mode:
authorDaniel Firth <dan.firth@codethink.co.uk>2013-12-20 15:47:25 +0000
committerBen Brown <ben.brown@codethink.co.uk>2013-12-20 16:02:35 +0000
commitce99ab4010dee8f4a60844c004b2bddbcdfe5dec (patch)
treed7c327422959b8d9346fab67ea5b5aa8475cd7e6 /morphlib/util.py
parent973f61504ec71e0ec925b592f12825aa0c9ab9d9 (diff)
downloadmorph-ce99ab4010dee8f4a60844c004b2bddbcdfe5dec.tar.gz
LocalArtifactCache now takes a an FS object
Diffstat (limited to 'morphlib/util.py')
-rw-r--r--morphlib/util.py8
1 files changed, 5 insertions, 3 deletions
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