summaryrefslogtreecommitdiff
path: root/src/buildstream/_gitsourcebase.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_gitsourcebase.py')
-rw-r--r--src/buildstream/_gitsourcebase.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildstream/_gitsourcebase.py b/src/buildstream/_gitsourcebase.py
index 4e9e59161..739ae5169 100644
--- a/src/buildstream/_gitsourcebase.py
+++ b/src/buildstream/_gitsourcebase.py
@@ -53,14 +53,17 @@ class _RefFormat(FastEnum):
# might have at a given time
#
class _GitMirror(SourceFetcher):
- def __init__(self, source, path, url, ref, *, primary=False, tags=[]):
+ def __init__(self, source, path, url, ref, *, primary=False, tags=None):
super().__init__()
self.source = source
self.path = path
self.url = url
self.ref = ref
- self.tags = tags
+ if tags is None:
+ self.tags = []
+ else:
+ self.tags = tags
self.primary = primary
self.mirror = os.path.join(source.get_mirror_directory(), utils.url_directory_name(url))
self.mark_download_url(url)