From 55aedba17f8a8ac676fe18cbdd2d4b6fef202eda Mon Sep 17 00:00:00 2001 From: Tristan Maat Date: Fri, 6 Apr 2018 12:16:52 +0000 Subject: Allow 'None' as a default_value for _yaml.node_get --- buildstream/_workspaces.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'buildstream/_workspaces.py') 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) -- cgit v1.2.1