Skip to content

Commit

Permalink
Remove unnecessary directory check at startup
Browse files Browse the repository at this point in the history
* Loading root.json will fail just as descriptively
* As long as Bundle doesn't implement bootstrapping
  the local repo, there's also no need to create
  missing directories

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
  • Loading branch information
Jussi Kukkonen committed May 6, 2021
1 parent 36f34ce commit 379d333
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tuf/client_rework/metadata_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ def __init__(self, repository_path: str):
self._bundle = {} # type: Dict[str: Metadata]
self.reference_time = None

if not os.path.exists(self._path):
# TODO try to create dir instead?
raise exceptions.RepositoryError("Repository does not exist")

# Load and validate the local root metadata
# Valid root metadata is required
logger.debug("Loading local root")
Expand Down

0 comments on commit 379d333

Please sign in to comment.