summaryrefslogtreecommitdiff
path: root/buildstream/sandbox/_sandboxremote.py
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-03-01 11:11:15 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-03-01 18:28:36 +0000
commitff059b8b9852054f6669bb8bdeb6945ff0631b70 (patch)
tree90a0a943f1a0565220032fdc5c7a789de88a51a8 /buildstream/sandbox/_sandboxremote.py
parent1eba1fed210d9814a06ef2b9a24610132b18235c (diff)
downloadbuildstream-ff059b8b9852054f6669bb8bdeb6945ff0631b70.tar.gz
Use [a, b, *c] instead of [a, b] + c when building listbschubert/more-pythonic-list-concat
This pattern is available from python3.5 and provides a simpler understanding of what is going on
Diffstat (limited to 'buildstream/sandbox/_sandboxremote.py')
-rw-r--r--buildstream/sandbox/_sandboxremote.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream/sandbox/_sandboxremote.py
index 81702743a..38fc170f4 100644
--- a/buildstream/sandbox/_sandboxremote.py
+++ b/buildstream/sandbox/_sandboxremote.py
@@ -123,7 +123,7 @@ class SandboxRemote(Sandbox):
service_keys = ['execution-service', 'storage-service', 'action-cache-service']
- _yaml.node_validate(remote_config, ['url'] + service_keys)
+ _yaml.node_validate(remote_config, ['url', *service_keys])
exec_config = require_node(remote_config, 'execution-service')
storage_config = require_node(remote_config, 'storage-service')
@@ -131,10 +131,10 @@ class SandboxRemote(Sandbox):
tls_keys = ['client-key', 'client-cert', 'server-cert']
- _yaml.node_validate(exec_config, ['url', 'instance-name'] + tls_keys)
- _yaml.node_validate(storage_config, ['url', 'instance-name'] + tls_keys)
+ _yaml.node_validate(exec_config, ['url', 'instance-name', *tls_keys])
+ _yaml.node_validate(storage_config, ['url', 'instance-name', *tls_keys])
if action_config:
- _yaml.node_validate(action_config, ['url', 'instance-name'] + tls_keys)
+ _yaml.node_validate(action_config, ['url', 'instance-name', *tls_keys])
# Maintain some backwards compatibility with older configs, in which
# 'url' was the only valid key for remote-execution: