summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2019-01-31 20:19:19 +0000
committerJames Ennis <james.ennis@codethink.com>2019-02-13 09:35:45 +0000
commitddf642e1ecfff220651792a55e3949fe15cb72bf (patch)
tree51f159f292c434aba6317c828239186b32d3cfb3
parent7cb6be7438e9d4076e2943538d54305838f48ddc (diff)
downloadbuildstream-ddf642e1ecfff220651792a55e3949fe15cb72bf.tar.gz
metaelement.py: Provide constructor with default keyword arguments
-rw-r--r--buildstream/_loader/metaelement.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/buildstream/_loader/metaelement.py b/buildstream/_loader/metaelement.py
index c13d5591e..943b925ff 100644
--- a/buildstream/_loader/metaelement.py
+++ b/buildstream/_loader/metaelement.py
@@ -38,20 +38,20 @@ class MetaElement():
# sandbox: Configuration specific to the sandbox environment
# first_pass: The element is to be loaded with first pass configuration (junction)
#
- def __init__(self, project, name, kind, provenance, sources, config,
- variables, environment, env_nocache, public, sandbox,
- first_pass):
+ def __init__(self, project, name, kind=None, provenance=None, sources=None, config=None,
+ variables=None, environment=None, env_nocache=None, public=None,
+ sandbox=None, first_pass=False):
self.project = project
self.name = name
self.kind = kind
self.provenance = provenance
self.sources = sources
- self.config = config
- self.variables = variables
- self.environment = environment
- self.env_nocache = env_nocache
- self.public = public
- self.sandbox = sandbox
+ self.config = config or {}
+ self.variables = variables or {}
+ self.environment = environment or {}
+ self.env_nocache = env_nocache or []
+ self.public = public or {}
+ self.sandbox = sandbox or {}
self.build_dependencies = []
self.dependencies = []
self.first_pass = first_pass