How to use the nvchecker.core.write_verfile function in nvchecker

To help you get started, we’ve selected a few nvchecker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lilydjwg / nvchecker / nvchecker / tools.py View on Github external
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)