Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
oldvers[name] = newvers[name]
except KeyError:
if args.ignore_nonexistent:
logger.warning('nonexistent in newver, ignored', name=name)
continue
logger.critical(
"doesn't exist in 'newver' set.", name=name,
)
sys.exit(2)
try:
os.rename(s.oldver, s.oldver + '~')
except FileNotFoundError:
pass
core.write_verfile(s.oldver, oldvers)