mlog: remove incorrect uses of global keyword

global is only needed to allow replacement of global values, they're
always in scope to read.
pull/4325/head
Dylan Baker 5 years ago committed by Xavier Claessens
parent 3778a34979
commit eb30c493f6
  1. 2
      mesonbuild/mlog.py

@ -160,7 +160,6 @@ def process_markup(args: Sequence[Union[AnsiDecorator, str]], keep: bool) -> Lis
return arr
def force_print(*args: str, **kwargs: Any) -> None:
global log_disable_stdout
if log_disable_stdout:
return
iostr = io.StringIO()
@ -197,7 +196,6 @@ def cmd_ci_include(file: str) -> None:
def log(*args: Union[str, AnsiDecorator], is_error: bool = False,
**kwargs: Any) -> None:
global log_errors_only
arr = process_markup(args, False)
if log_file is not None:
print(*arr, file=log_file, **kwargs)

Loading…
Cancel
Save