Skip to content

Commit 7a8060c

Browse files
authored
Suppress welcome message in 'py list -1' output. (#208)
Also moves it to standard error instead of stdout. Fixes #203
1 parent e157656 commit 7a8060c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/manage/commands.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def show_welcome(self, copyright=True):
516516
except OSError:
517517
LOGGER.debug("Failed to update %s", last_update_file, exc_info=True)
518518
return
519-
LOGGER.print(WELCOME)
519+
LOGGER.info(WELCOME)
520520

521521
def dump_arguments(self):
522522
try:
@@ -716,7 +716,10 @@ class ListCommand(BaseCommand):
716716

717717
def execute(self):
718718
from .list_command import execute
719-
self.show_welcome()
719+
# gh-203: Don't show welcome message for "-1" to minimise the risk of it
720+
# mixing with parsed output.
721+
if not self.one:
722+
self.show_welcome()
720723
if self.default_source:
721724
LOGGER.debug("Loading 'install' command to get source")
722725
inst_cmd = COMMANDS["install"](["install"], self.root)

0 commit comments

Comments
 (0)