Browse Source

perf: 添加tips

pull/11554/head
ibuler 1 year ago
parent
commit
a6d78834e7
  1. 11
      apps/common/management/commands/check_api.py

11
apps/common/management/commands/check_api.py

@ -106,14 +106,21 @@ class Command(BaseCommand):
errors[url] = str(e) errors[url] = str(e)
error_urls.append(url) error_urls.append(url)
print("\nNo auth urls:") unauth_urls = set(unauth_urls) - set(known_unauth_urls)
for url in set(unauth_urls) - set(known_unauth_urls): print("\nUnauthorized urls:")
if not unauth_urls:
print(" Empty, very good!")
for url in unauth_urls:
print('"{}", {}'.format(url, errors.get(url, ''))) print('"{}", {}'.format(url, errors.get(url, '')))
print("\nError urls:") print("\nError urls:")
if not error_urls:
print(" Empty, very good!")
for url in set(error_urls): for url in set(error_urls):
print(url, ': ' + errors.get(url)) print(url, ': ' + errors.get(url))
print("\nUnformat urls:") print("\nUnformat urls:")
if not unformat_urls:
print(" Empty, very good!")
for url in unformat_urls: for url in unformat_urls:
print(url) print(url)

Loading…
Cancel
Save