Handle sort=none better

This commit is contained in:
Tom Rathborne 2022-02-10 09:45:43 +01:00
parent 9ea6f37712
commit 6d8f00036d

View File

@ -111,7 +111,10 @@ def cmp() -> None:
'newver': newver
}
if args.sort != "none" and oldver is not None and newver is not None:
if oldver is not None and newver is not None:
if args.sort == "none":
diff['delta'] = 'new' # assume it's a new version if we're not comparing
else:
from .sortversion import sort_version_keys
version = sort_version_keys[args.sort]