Skip to content

Commit

Permalink
base: Gracefully handle missing repodata
Browse files Browse the repository at this point in the history
  • Loading branch information
avdgrinten committed Nov 10, 2024
1 parent 4075213 commit ac51322
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xbstrap/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,10 @@ def download_remote_xbps_repodata(self, arch):
def access_local_xbps_repodata(self, arch):
rd_path = os.path.join(self.xbps_repository_dir, f"{arch}-repodata")

index = _xbps_utils.read_repodata(rd_path)
try:
index = _xbps_utils.read_repodata(rd_path)
except FileNotFoundError:
return {}
return index

def get_installed_pkgs(self):
Expand Down

0 comments on commit ac51322

Please sign in to comment.