From c66ca7f2bca0033f5778e352cf58a943eb5a390a Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Fri, 24 May 2024 15:04:49 +0800 Subject: [PATCH] fix nvtake name=version corrupted the oldver file fixes #272. --- nvchecker/tools.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nvchecker/tools.py b/nvchecker/tools.py index ecd0894..de064fb 100644 --- a/nvchecker/tools.py +++ b/nvchecker/tools.py @@ -1,6 +1,6 @@ # vim: se sw=2: # MIT licensed -# Copyright (c) 2013-2020 lilydjwg , et al. +# Copyright (c) 2013-2024 lilydjwg , et al. import sys import argparse @@ -10,6 +10,7 @@ import json import os.path from . import core +from .util import RichResult logger = structlog.get_logger(logger_name=__name__) @@ -44,10 +45,11 @@ def take() -> None: if args.all: oldvers.update(newvers) else: + name: str for name in args.names: if "=" in name: name, newver = name.split("=") - oldvers[name] = newver + oldvers[name] = RichResult(version=newver) else: try: oldvers[name] = newvers[name]