original_docstring: 
          Check if pygit2/libgit2 are available and at a compatible version.
          Pygit2 must be at least 0.20.3 and libgit2 must be at least 0.20.0.
          
docstring: Check if pygit2/libgit2 are available and at a compatible version.
  Pygit2 must be at least 0.20.3 and libgit2 must be at least 0.20.0.
docstring_tokens: Check if pygit2 / libgit2 are available and at a compatible version . Pygit2 must be at least 0 . 20 . 3 and libgit2 must be at least 0 . 20 . 0 .
code: def verify_pygit2(self, quiet=False):
          '''
          Check if pygit2/libgit2 are available and at a compatible version.
          Pygit2 must be at least 0.20.3 and libgit2 must be at least 0.20.0.
          '''
          def _recommend():
              if HAS_GITPYTHON and 'gitpython' in self.valid_providers:
                  log.error(_RECOMMEND_GITPYTHON.format(self.role))
              if HAS_DULWICH and 'dulwich' in self.valid_providers:
                  log.error(_RECOMMEND_DULWICH.format(self.role))
  
          if not HAS_PYGIT2:
              if not quiet:
                  log.error(
                      '%s is configured but could not be loaded, are pygit2 '
                      'and libgit2 installed?', self.role
                  )
                  _recommend()
              return False
          elif 'pygit2' not in self.valid_providers:
              return False
  
          # pylint: disable=no-member
          pygit2ver = distutils.version.LooseVersion(pygit2.__version__)
          pygit2_minver = distutils.version.LooseVersion(PYGIT2_MINVER)
  
          libgit2ver = distutils.version.LooseVersion(pygit2.LIBGIT2_VERSION)
          libgit2_minver = distutils.version.LooseVersion(LIBGIT2_MINVER)
          # pylint: enable=no-member
  
          errors = []
          if pygit2ver < pygit2_minver:
              errors.append(
                  '{0} is configured, but the pygit2 version is earlier than '
                  '{1}. Version {2} detected.'.format(
                      self.role,
                      PYGIT2_MINVER,
                      pygit2.__version__
                  )
              )
          if libgit2ver < libgit2_minver:
              errors.append(
                  '{0} is configured, but the libgit2 version is earlier than '
                  '{1}. Version {2} detected.'.format(
                      self.role,
                      LIBGIT2_MINVER,
                      pygit2.LIBGIT2_VERSION
                  )
              )
          if not salt.utils.which('git'):
              errors.append(
                  'The git command line utility is required when using the '
                  '\'pygit2\' {0}_provider.'.format(self.role)
              )
  
          if errors:
              for error in errors:
                  log.error(error)
              if not quiet:
                  _recommend()
              return False
  
          self.opts['verified_{0}_provider'.format(self.role)] = 'pygit2'
          log.debug('pygit2 {0}_provider enabled'.format(self.role))
          return True
code_tokens: def verify_pygit2 ( self , quiet = False ) : def _recommend ( ) : if HAS_GITPYTHON and 'gitpython' in self . valid_providers : log . error ( _RECOMMEND_GITPYTHON . format ( self . role ) ) if HAS_DULWICH and 'dulwich' in self . valid_providers : log . error ( _RECOMMEND_DULWICH . format ( self . role ) ) if not HAS_PYGIT2 : if not quiet : log . error ( '%s is configured but could not be loaded, are pygit2 ' 'and libgit2 installed?' , self . role ) _recommend ( ) return False elif 'pygit2' not in self . valid_providers : return False pygit2ver = distutils . version . LooseVersion ( pygit2 . __version__ ) pygit2_minver = distutils . version . LooseVersion ( PYGIT2_MINVER ) libgit2ver = distutils . version . LooseVersion ( pygit2 . LIBGIT2_VERSION ) libgit2_minver = distutils . version . LooseVersion ( LIBGIT2_MINVER ) errors = [ ] if pygit2ver < pygit2_minver : errors . append ( '{0} is configured, but the pygit2 version is earlier than ' '{1}. Version {2} detected.' . format ( self . role , PYGIT2_MINVER , pygit2 . __version__ ) ) if libgit2ver < libgit2_minver : errors . append ( '{0} is configured, but the libgit2 version is earlier than ' '{1}. Version {2} detected.' . format ( self . role , LIBGIT2_MINVER , pygit2 . LIBGIT2_VERSION ) ) if not salt . utils . which ( 'git' ) : errors . append ( 'The git command line utility is required when using the ' '\'pygit2\' {0}_provider.' . format ( self . role ) ) if errors : for error in errors : log . error ( error ) if not quiet : _recommend ( ) return False self . opts [ 'verified_{0}_provider' . format ( self . role ) ] = 'pygit2' log . debug ( 'pygit2 {0}_provider enabled' . format ( self . role ) ) return True
short_docstring: Check if pygit2/libgit2 are available and at a compatible version.
short_docstring_tokens: Check if pygit2 / libgit2 are available and at a compatible version .
comment: '''
          Check if pygit2/libgit2 are available and at a compatible version.
          Pygit2 must be at least 0.20.3 and libgit2 must be at least 0.20.0.
          '''$SEP$# pylint: disable=no-member$SEP$# pylint: enable=no-member