|
|
@ -412,7 +412,7 @@ def start_pager() -> None: |
|
|
|
# "X" : do not clear the screen when leaving the pager |
|
|
|
# "X" : do not clear the screen when leaving the pager |
|
|
|
# "F" : skip the pager if content fit into the screen |
|
|
|
# "F" : skip the pager if content fit into the screen |
|
|
|
pager_cmd = ['less', '-RXF'] |
|
|
|
pager_cmd = ['less', '-RXF'] |
|
|
|
global log_pager |
|
|
|
global log_pager # pylint: disable=global-statement |
|
|
|
assert log_pager is None |
|
|
|
assert log_pager is None |
|
|
|
try: |
|
|
|
try: |
|
|
|
log_pager = subprocess.Popen(pager_cmd, stdin=subprocess.PIPE, |
|
|
|
log_pager = subprocess.Popen(pager_cmd, stdin=subprocess.PIPE, |
|
|
@ -424,7 +424,7 @@ def start_pager() -> None: |
|
|
|
raise MesonException(f'Failed to start pager: {str(e)}') |
|
|
|
raise MesonException(f'Failed to start pager: {str(e)}') |
|
|
|
|
|
|
|
|
|
|
|
def stop_pager() -> None: |
|
|
|
def stop_pager() -> None: |
|
|
|
global log_pager |
|
|
|
global log_pager # pylint: disable=global-statement |
|
|
|
if log_pager: |
|
|
|
if log_pager: |
|
|
|
try: |
|
|
|
try: |
|
|
|
log_pager.stdin.flush() |
|
|
|
log_pager.stdin.flush() |
|
|
|