This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch aevri/picklable_jobs
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 8bd512f3f8e7638958246719e0a2bf3961458ada
Author: Angelos Evripiotis <[email protected]>
AuthorDate: Tue Apr 2 11:52:24 2019 +0100

    WIP: pickle: Context: no _message_handler
---
 src/buildstream/_context.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py
index fc758d4..9aa6295 100644
--- a/src/buildstream/_context.py
+++ b/src/buildstream/_context.py
@@ -169,6 +169,19 @@ class Context():
         self._casquota = None
         self._directory = directory
 
+    def __getstate__(self):
+        state = self.__dict__.copy()
+
+        # Looks we can construct these if they're missing.
+        # Note that we'll need figure out what to do with 'required elements',
+        # hopefully nothing.
+        # state['_artifactcache'] = None
+        # state['_sourcecache'] = None
+
+        del state['_message_handler']
+
+        return state
+
     # load()
     #
     # Loads the configuration files

Reply via email to