Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/general.py
diff options
context:
space:
mode:
authorDylan Taylor <dylan@dylanmtaylor.com>2021-05-15 15:24:34 -0400
committerDylan Taylor <dylan@dylanmtaylor.com>2021-05-15 15:24:34 -0400
commit96a48664e2d69d138f58967fdd75c605ad21478e (patch)
tree0429b25ba97ea4457b1a1f52b0875859509696b8 /archinstall/lib/general.py
parentf7642786c9e169245fae52d8754b9d68f2507cb7 (diff)
Fix mutable default arguments
https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments
Diffstat (limited to 'archinstall/lib/general.py')
-rw-r--r--archinstall/lib/general.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py
index 816fa755..7296b943 100644
--- a/archinstall/lib/general.py
+++ b/archinstall/lib/general.py
@@ -89,7 +89,9 @@ class sys_command:
Stolen from archinstall_gui
"""
- def __init__(self, cmd, callback=None, start_callback=None, peak_output=False, environment_vars={}, *args, **kwargs):
+ def __init__(self, cmd, callback=None, start_callback=None, peak_output=False, environment_vars=None, *args, **kwargs):
+ if environment_vars is None:
+ environment_vars = {}
kwargs.setdefault("worker_id", gen_uid())
kwargs.setdefault("emulate", False)
kwargs.setdefault("suppress_errors", False)