From 96a48664e2d69d138f58967fdd75c605ad21478e Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 15:24:34 -0400 Subject: Fix mutable default arguments https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments --- archinstall/lib/profiles.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'archinstall/lib/profiles.py') diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py index 62190cbf..871e6223 100644 --- a/archinstall/lib/profiles.py +++ b/archinstall/lib/profiles.py @@ -163,8 +163,10 @@ class Script: class Profile(Script): - def __init__(self, installer, path, args={}): + def __init__(self, installer, path, args=None): super(Profile, self).__init__(path, installer) + if args is None: + args = {} def __dump__(self, *args, **kwargs): return {'path': self.path} -- cgit v1.2.3-54-g00ecf