original_docstring: 
          Common code for git_pillar/winrepo to handle locking and checking out
          of a repo.
          
docstring: Common code for git_pillar/winrepo to handle locking and checking out
  of a repo.
docstring_tokens: Common code for git_pillar / winrepo to handle locking and checking out of a repo .
code: def do_checkout(self, repo):
          '''
          Common code for git_pillar/winrepo to handle locking and checking out
          of a repo.
          '''
          time_start = time.time()
          while time.time() - time_start <= 5:
              try:
                  return repo.checkout()
              except GitLockError as exc:
                  if exc.errno == errno.EEXIST:
                      time.sleep(0.1)
                      continue
                  else:
                      log.error(
                          'Error %d encountered while obtaining checkout '
                          'lock for %s remote \'%s\': %s',
                          exc.errno,
                          repo.role,
                          repo.id,
                          exc,
                          exc_info_on_loglevel=logging.DEBUG
                      )
                      break
          else:
              log.error(
                  'Timed out waiting for checkout lock to be released for '
                  '%s remote \'%s\'. If this error persists, run \'salt-run '
                  'cache.clear_git_lock %s type=checkout\' to clear it.',
                  self.role, repo.id, self.role
              )
          return None
code_tokens: def do_checkout ( self , repo ) : time_start = time . time ( ) while time . time ( ) - time_start <= 5 : try : return repo . checkout ( ) except GitLockError as exc : if exc . errno == errno . EEXIST : time . sleep ( 0.1 ) continue else : log . error ( 'Error %d encountered while obtaining checkout ' 'lock for %s remote \'%s\': %s' , exc . errno , repo . role , repo . id , exc , exc_info_on_loglevel = logging . DEBUG ) break else : log . error ( 'Timed out waiting for checkout lock to be released for ' '%s remote \'%s\'. If this error persists, run \'salt-run ' 'cache.clear_git_lock %s type=checkout\' to clear it.' , self . role , repo . id , self . role ) return None
short_docstring: Common code for git_pillar/winrepo to handle locking and checking out
  of a repo.
short_docstring_tokens: Common code for git_pillar / winrepo to handle locking and checking out of a repo .
comment: '''
          Common code for git_pillar/winrepo to handle locking and checking out
          of a repo.
          '''