summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Maat <tristan.maat@codethink.co.uk>2018-03-27 16:34:45 +0100
committerTristan Maat <tm@tlater.net>2018-03-28 12:16:10 +0000
commit2d7b721b8b7d2984c394e5af6ed4883baae7da1f (patch)
tree1160a970f4bad32520b31d0c0ac46d28872edc36
parent95510ad6109d1c5191b6d9cbc1a4d836de975a7c (diff)
downloadbuildstream-2d7b721b8b7d2984c394e5af6ed4883baae7da1f.tar.gz
_workspaces.py: Fix fallout from using python3.4
-rw-r--r--buildstream/_workspaces.py6
-rw-r--r--tests/frontend/workspace.py4
2 files changed, 6 insertions, 4 deletions
diff --git a/buildstream/_workspaces.py b/buildstream/_workspaces.py
index a621f277f..f0118ec36 100644
--- a/buildstream/_workspaces.py
+++ b/buildstream/_workspaces.py
@@ -134,9 +134,11 @@ class Workspace():
#
def add_running_files(self, dep, files):
if dep.name in self.running_files:
- self.running_files[dep.name] |= set(files)
+ # ruamel.py cannot serialize sets in python3.4
+ to_add = set(files) - set(self.running_files[dep.name])
+ self.running_files[dep.name].extend(to_add)
else:
- self.running_files[dep.name] = set(files)
+ self.running_files[dep.name] = list(files)
# clear_running_files()
#
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 8bbd516d3..b9744159b 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -302,7 +302,7 @@ def test_list_unsupported_workspace(cli, tmpdir, datafiles, workspace_cfg):
"path": "/workspaces/bravo",
"last_successful": "some_key",
"running_files": {
- "beta.bst": set(["some_file"])
+ "beta.bst": ["some_file"]
}
}
}
@@ -313,7 +313,7 @@ def test_list_unsupported_workspace(cli, tmpdir, datafiles, workspace_cfg):
"path": "/workspaces/bravo",
"last_successful": "some_key",
"running_files": {
- "beta.bst": set(["some_file"])
+ "beta.bst": ["some_file"]
}
}
}