replace DataSource's self.log

After adding the 'log' element to the DataSource class, pickling would
fail with 
  TypeError: can't pickle file objects

Instead of having the object with a log reference, use one from 
'DataSource.log' and have that set by cloudinit
This commit is contained in:
Scott Moser
2011-01-31 16:40:43 -05:00
parent d2932decb8
commit 074d60062d
5 changed files with 27 additions and 19 deletions

View File

@@ -87,12 +87,12 @@ class DataSourceOVF(DataSource.DataSource):
seedfound = proto
break
if not seedfound:
self.log.debug("seed from %s not supported by %s" %
log.debug("seed from %s not supported by %s" %
(seedfrom, self.__class__))
return False
(md_seed,ud) = util.read_seeded(seedfrom)
self.log.debug("using seeded cache data from %s" % seedfrom)
log.debug("using seeded cache data from %s" % seedfrom)
md = util.mergedict(md,md_seed)
found.append(seedfrom)