fix support for Python 3.7

This commit is contained in:
lilydjwg 2020-09-24 18:56:14 +08:00
parent cd1cbfde30
commit 254a229401
1 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,8 @@ NPM_URL = 'https://registry.npmjs.org/%s'
def configure(config): def configure(config):
global NPM_URL global NPM_URL
if url := config.get('registry'): url = config.get('registry')
if url:
NPM_URL = f'{url.rstrip("/")}/%s' NPM_URL = f'{url.rstrip("/")}/%s'
async def get_first_1k(url): async def get_first_1k(url):