def fetch(self): with remote_operation: fetch.clear() try: log.debug("Start fetching") self.repository.fetch(self.upstream, self.branch) fetch_successful.set() log.debug("Fetch done") except: fetch_successful.clear() log.exception("Fetch failed")
def fetch(self): with remote_operation: fetch.clear() try: log.debug("Start fetching") was_behind = self.repository.fetch(self.upstream, self.branch) fetch_successful.set() if was_behind: log.info("Fetch done") else: log.debug("Nothing to fetch") except: fetch_successful.clear() log.exception("Fetch failed")