mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-02-20 04:27:09 +00:00
pypi: fix valueless items
Fix checking for such an nvchecker.ini: [logcat-color] pypi =
This commit is contained in:
parent
ae011170af
commit
b108d9624a
@ -1,18 +1,14 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
from . import cmd, conf_cacheable_with_name, session
|
||||
from . import conf_cacheable_with_name, session
|
||||
|
||||
get_cacheable_conf = conf_cacheable_with_name('pypi')
|
||||
|
||||
async def get_version(name, conf, **kwargs):
|
||||
package = conf.get('pypi')
|
||||
package = conf.get('pypi') or name
|
||||
use_pre_release = conf.getboolean('use_pre_release', False)
|
||||
|
||||
headers = {
|
||||
'Accept': 'application/json',
|
||||
'User-Agent': 'lilydjwg/nvchecker',
|
||||
}
|
||||
url = 'https://pypi.org/pypi/{}/json'.format(package)
|
||||
|
||||
async with session.get(url) as res:
|
||||
|
Loading…
Reference in New Issue
Block a user