diff --git a/management/status_checks.py b/management/status_checks.py index 3bc5faa5..044a1187 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -1082,7 +1082,7 @@ class ConsoleOutput(FileOutput): class BufferedOutput: # Record all of the instance method calls so we can play them back later. def __init__(self, with_lines=None): - self.buf = [] if not with_lines else with_lines + self.buf = with_lines if with_lines else [] def __getattr__(self, attr): if attr not in {"add_heading", "print_ok", "print_error", "print_warning", "print_block", "print_line"}: raise AttributeError