mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-01-13 09:40:54 +00:00
write versions to record files even it's up-to-date.
This matches the old behavior, and the record file means what we get, not what are updated (that's what nvcmp does).
This commit is contained in:
parent
6a6d5df682
commit
027b8f9b46
@ -310,14 +310,12 @@ def _process_result(r: RawResult) -> Optional[Result]:
|
|||||||
|
|
||||||
def check_version_update(
|
def check_version_update(
|
||||||
oldvers: VersData, name: str, version: str,
|
oldvers: VersData, name: str, version: str,
|
||||||
) -> Optional[str]:
|
) -> None:
|
||||||
oldver = oldvers.get(name, None)
|
oldver = oldvers.get(name, None)
|
||||||
if not oldver or oldver != version:
|
if not oldver or oldver != version:
|
||||||
logger.info('updated', name=name, version=version, old_version=oldver)
|
logger.info('updated', name=name, version=version, old_version=oldver)
|
||||||
return version
|
|
||||||
else:
|
else:
|
||||||
logger.debug('up-to-date', name=name, version=version)
|
logger.debug('up-to-date', name=name, version=version)
|
||||||
return None
|
|
||||||
|
|
||||||
async def process_result(
|
async def process_result(
|
||||||
oldvers: VersData,
|
oldvers: VersData,
|
||||||
@ -330,10 +328,8 @@ async def process_result(
|
|||||||
r1 = _process_result(r)
|
r1 = _process_result(r)
|
||||||
if r1 is None:
|
if r1 is None:
|
||||||
continue
|
continue
|
||||||
v = check_version_update(
|
check_version_update(oldvers, r1.name, r1.version)
|
||||||
oldvers, r1.name, r1.version)
|
ret[r1.name] = r1.version
|
||||||
if v is not None:
|
|
||||||
ret[r1.name] = v
|
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user