We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90f1ad8 commit 9fc126fCopy full SHA for 9fc126f
scripts/pypi_cleanup.py
@@ -14,6 +14,9 @@
14
import requests
15
from requests.exceptions import RequestException
16
17
+_PYPI_URL_PROD = 'https://pypi.org/'
18
+_PYPI_URL_TEST = 'https://test.pypi.org/'
19
+
20
def valid_hostname(hostname):
21
"""Validate hostname format"""
22
if len(hostname) > 253:
@@ -63,12 +66,10 @@ def non_empty_string(value):
63
66
dry_run = args.dry
64
67
pypi_username = args.username
65
68
max_dev_releases = args.max_nightlies
-host = None
69
if args.prod:
- host = 'pypi.org'
-elif args.test:
70
- host = 'test.pypi.org'
71
-pypi_url = 'https://{}/'.format(host)
+ pypi_url = _PYPI_URL_PROD
+else:
72
+ pypi_url = _PYPI_URL_TEST
73
pypi_password = password
74
pypi_otp = otp
75
0 commit comments