diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2006-03-30 18:14:56 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2006-03-30 18:14:56 +0000 |
commit | 402f55a058425223160ef42d6ebb311a85a2b968 (patch) | |
tree | 63efbbcf8830bf64953a2cdfa46d734881d134bf /lib/bb | |
parent | c8c16719c4eb2e1d5552da807def819bcdb24210 (diff) | |
download | bitbake-402f55a058425223160ef42d6ebb311a85a2b968.tar.gz |
lib/bb/data_smart.py:
-The pickling API is not too obvious. One can
not call p.dump multiple times. Instead
we store it as a tuple.
-Same applies for unpickling.
-Hmm current programming languages suck. It
can't be true to use multiple assignment
for something as easy as a 'symmetric'
command.
Diffstat (limited to 'lib/bb')
-rw-r--r-- | lib/bb/data_smart.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index c894b7fd4..a0258e550 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -286,9 +286,7 @@ class DataSmartPackage(DataSmart): """ cache_bbfile = self.sanitize_filename(self.bbfile) p = pickle.Unpickler( file("%s/%s"%(self.cache,cache_bbfile),"rb")) - self.dict = p.load() - self._seen_overrides = p.load() - self._special_values = p.load() + (self.dict, self._seen_overrides, self._special_values) = p.load() self.unpickle_prep() # compile the functions into global scope @@ -337,9 +335,7 @@ class DataSmartPackage(DataSmart): cache_bbfile = self.sanitize_filename(self.bbfile) p = pickle.Pickler(file("%s/%s" %(self.cache,cache_bbfile), "wb" ), -1 ) - p.dump( self.dict ) - p.dump( self._seen_overrides ) - p.dump( self._special_values ) + p.dump( (self.dict,self._seen_overrides,self._special_values) ) self.unpickle_prep() |