summaryrefslogtreecommitdiff
path: root/buildstream/_workspaces.py
diff options
context:
space:
mode:
authorTristan Maat <tm@tlater.net>2018-04-06 12:16:52 +0000
committerTristan Maat <tm@tlater.net>2018-04-06 15:01:14 +0000
commit55aedba17f8a8ac676fe18cbdd2d4b6fef202eda (patch)
tree584f4a40d8a64f656f5a4209403e17d899d1d9a7 /buildstream/_workspaces.py
parent23edfe5d961136c2a22fd4c0939bb9dc0e9e3a14 (diff)
downloadbuildstream-node-get-default.tar.gz
Allow 'None' as a default_value for _yaml.node_getnode-get-default
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)