Handle exceptions in Repo.get_package. (RhBug:963680)