def _get_shafile(self, sha): dir = sha[:2] file = sha[2:] # Check from object dir path = os.path.join(self.path, dir, file) if os.path.exists(path): return ShaFile.from_file(path) return None
def _get_shafile(self, sha): path = self._get_shafile_path(sha) if os.path.exists(path): return ShaFile.from_file(path) return None