summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-06-05 18:37:38 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-06-06 15:05:21 +0000
commit698cb45def22da93aef6df252ffc882e1755aff4 (patch)
tree5ac60ad4047e845d7355a5a05283c849c5f9c324
parentb9dc87c97fc5ed9572752c009fa7d591b557ad51 (diff)
downloadbuildstream-698cb45def22da93aef6df252ffc882e1755aff4.tar.gz
tests/artifactcache/config: Fix pylint issues
-rw-r--r--tests/artifactcache/config.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py
index 46901937b..591cc0e03 100644
--- a/tests/artifactcache/config.py
+++ b/tests/artifactcache/config.py
@@ -1,11 +1,11 @@
# Pylint doesn't play well with fixtures and dependency injection from pytest
# pylint: disable=redefined-outer-name
-import pytest
-
import itertools
import os
+import pytest
+
from buildstream._artifactcache import ArtifactCacheSpec, ArtifactCache
from buildstream._context import Context
from buildstream._project import Project
@@ -27,7 +27,13 @@ cache6 = ArtifactCacheSpec(url='https://example.com/cache6', push=True)
# Generate cache configuration fragments for the user config and project config files.
#
-def configure_remote_caches(override_caches, project_caches=[], user_caches=[]):
+def configure_remote_caches(override_caches, project_caches=None, user_caches=None):
+ if project_caches is None:
+ project_caches = []
+
+ if user_caches is None:
+ user_caches = []
+
user_config = {}
if len(user_caches) == 1:
user_config['artifacts'] = {
@@ -58,7 +64,7 @@ def configure_remote_caches(override_caches, project_caches=[], user_caches=[]):
}
project_config = {}
- if len(project_caches) > 0:
+ if project_caches:
if len(project_caches) == 1:
project_config.update({
'artifacts': {