summaryrefslogtreecommitdiff
path: root/buildstream/_workspaces.py
diff options
context:
space:
mode:
authorTristan Maat <tm@tlater.net>2018-04-06 12:16:52 +0000
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-04-07 10:05:10 +0000
commit3ba544b80f9f268be8ffe62fc8589b30212ec4a2 (patch)
tree7d852ddeb05a06d0744506dadd8d4280fede7830 /buildstream/_workspaces.py
parent2ca11fde3b63f6daa6d58ece4155a6d42ed92b34 (diff)
downloadbuildstream-3ba544b80f9f268be8ffe62fc8589b30212ec4a2.tar.gz
Allow 'None' as a default_value for _yaml.node_get
Diffstat (limited to 'buildstream/_workspaces.py')
-rw-r--r--buildstream/_workspaces.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/buildstream/_workspaces.py b/buildstream/_workspaces.py
index da430b540..8b7458771 100644
--- a/buildstream/_workspaces.py
+++ b/buildstream/_workspaces.py
@@ -58,13 +58,8 @@ class Workspace():
@classmethod
def from_yaml_node(cls, node, project):
path = _yaml.node_get(node, str, 'path')
- last_successful = _yaml.node_get(node, str, 'last_successful', default_value='')
- running_files = _yaml.node_get(node, dict, 'running_files', default_value={})
-
- if last_successful == '':
- last_successful = None
- if running_files == {}:
- running_files = None
+ last_successful = _yaml.node_get(node, str, 'last_successful', default_value=None)
+ running_files = _yaml.node_get(node, dict, 'running_files', default_value=None)
return cls(path, project, last_successful, running_files)