diff --git a/buildbot_nix/__init__.py b/buildbot_nix/__init__.py index 9eef54a..9e89d7f 100644 --- a/buildbot_nix/__init__.py +++ b/buildbot_nix/__init__.py @@ -5,7 +5,7 @@ import sys import graphlib import base64 from collections.abc import Generator -from dataclasses import dataclass +from dataclasses import dataclass, field from pathlib import Path from typing import TYPE_CHECKING, Any @@ -47,9 +47,9 @@ class NixBuilder: publicHostKey: str | None = None sshUser: str | None = None sshKey: str | None = None - systems: list[str] = ["-"] - supportedFeatures: list[str] = ["-"] - mandatoryFeatures: list[str] = ["-"] + systems: list[str] = field(default_factory=lambda: ["-"]) + supportedFeatures: list[str] = field(default_factory=lambda: ["-"]) + mandatoryFeatures: list[str] = field(default_factory=lambda: ["-"]) def to_nix_line(self): encoded_public_key = base64.b64encode(self.publicHostKey.encode('ascii')).decode('ascii') if self.publicHostKey is not None else "-"