Skip to content

Commit 5cafb91

Browse files
authored
Reduce unnecessary output in default 'py list --online'. (#316)
1 parent 38c243c commit 5cafb91

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/manage/list_command.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,7 @@ def execute(cmd):
331331
]:
332332
if source:
333333
downloader = IndexDownloader(cmd, source, Index)
334-
if cmd.fallback_source_only:
335-
downloader.quiet = True
334+
downloader.quiet = True
336335
try:
337336
installs = _get_installs_from_index(
338337
downloader,

src/manage/urlutils.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,11 +796,16 @@ def __next__(self):
796796
verified = self.verify(url, data, parsed, show_settings=True)
797797

798798
if verified is True:
799-
LOGGER.info("!G!The signature for %s was successfully verified.!W!", s_url)
799+
(LOGGER.verbose if self.quiet else LOGGER.info)(
800+
"!G!The signature for %s was successfully verified.!W!",
801+
s_url,
802+
)
800803
elif verified is False:
801804
LOGGER.warn("Signature verification failure ignored for %s", s_url)
802805
else:
803-
LOGGER.info("No signature to verify for %s", s_url)
806+
(LOGGER.verbose if self.quiet else LOGGER.info)(
807+
"No signature to verify for %s", s_url
808+
)
804809

805810
self._cache[url] = data
806811

0 commit comments

Comments
 (0)