original_docstring: 
          Check if dulwich is available.
          
docstring: Check if dulwich is available.
docstring_tokens: Check if dulwich is available .
code: def verify_dulwich(self, quiet=False):
          '''
          Check if dulwich is available.
          '''
          def _recommend():
              if HAS_GITPYTHON and 'gitpython' in self.valid_providers:
                  log.error(_RECOMMEND_GITPYTHON.format(self.role))
              if HAS_PYGIT2 and 'pygit2' in self.valid_providers:
                  log.error(_RECOMMEND_PYGIT2.format(self.role))
  
          if not HAS_DULWICH:
              if not quiet:
                  log.error(
                      '%s is configured but could not be loaded. Is Dulwich '
                      'installed?', self.role
                  )
                  _recommend()
              return False
          elif 'dulwich' not in self.valid_providers:
              return False
  
          errors = []
  
          if dulwich.__version__ < DULWICH_MINVER:
              errors.append(
                  '{0} is configured, but the installed version of Dulwich is '
                  'earlier than {1}. Version {2} detected.'.format(
                      self.role,
                      DULWICH_MINVER,
                      dulwich.__version__
                  )
              )
  
          if errors:
              for error in errors:
                  log.error(error)
              if not quiet:
                  _recommend()
              return False
  
          self.opts['verified_{0}_provider'.format(self.role)] = 'dulwich'
          log.debug('dulwich {0}_provider enabled'.format(self.role))
          return True
code_tokens: def verify_dulwich ( self , quiet = False ) : def _recommend ( ) : if HAS_GITPYTHON and 'gitpython' in self . valid_providers : log . error ( _RECOMMEND_GITPYTHON . format ( self . role ) ) if HAS_PYGIT2 and 'pygit2' in self . valid_providers : log . error ( _RECOMMEND_PYGIT2 . format ( self . role ) ) if not HAS_DULWICH : if not quiet : log . error ( '%s is configured but could not be loaded. Is Dulwich ' 'installed?' , self . role ) _recommend ( ) return False elif 'dulwich' not in self . valid_providers : return False errors = [ ] if dulwich . __version__ < DULWICH_MINVER : errors . append ( '{0} is configured, but the installed version of Dulwich is ' 'earlier than {1}. Version {2} detected.' . format ( self . role , DULWICH_MINVER , dulwich . __version__ ) ) if errors : for error in errors : log . error ( error ) if not quiet : _recommend ( ) return False self . opts [ 'verified_{0}_provider' . format ( self . role ) ] = 'dulwich' log . debug ( 'dulwich {0}_provider enabled' . format ( self . role ) ) return True
short_docstring: Check if dulwich is available.
short_docstring_tokens: Check if dulwich is available .
comment: '''
          Check if dulwich is available.
          '''