code: def clear_lock(self, remote=None, lock_type='update'):
          '''
          Clear update.lk for all remotes
          '''
          cleared = []
          errors = []
          for repo in self.remotes:
              if remote:
                  # Specific remote URL/pattern was passed, ensure that the URL
                  # matches or else skip this one
                  try:
                      if not fnmatch.fnmatch(repo.url, remote):
                          continue
                  except TypeError:
                      # remote was non-string, try again
                      if not fnmatch.fnmatch(repo.url, six.text_type(remote)):
                          continue
              success, failed = repo.clear_lock(lock_type=lock_type)
              cleared.extend(success)
              errors.extend(failed)
          return cleared, errorf clear_lock(self, remote=None, lock_type='update'):
          '''
          Clear update.lk for all remotes
          '''
          cleared = []
          errors = []
          for repo in self.remotes:
              if remote:
                  # Specific remote URL/pattern was passed, ensure that the URL
                  # matches or else skip this one
                  try:
                      if not fnmatch.fnmatch(repo.url, remote):
                          continue
                  except TypeError:
                      # remote was non-string, try again
                      if not fnmatch.fnmatch(repo.url, six.text_type(remote)):
                          continue
              success, failed = repo.clear_lock(lock_type=lock_type)
              cleared.extend(success)
              errors.extend(failed)
          return cleared, errors
docs: Clear update.lk for all remotes