Fix prefix file_prefix to support "" value #1072
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #: None
Description of the changes being introduced by the pull request:
If we run the tuf unit tests with latest, not yet released,
securesyslib changes we will see that one unit test is failing
because the file_prefix argument should confront the PATH_SCHEMA
(which requires a non-empty string) but an empty string value
is passed to it.
That happens, because in tuf/developer_tool.py create_new_project
function:
https://github.com/theupdateframework/tuf/blob/b309e1befaa1df1df5afd25cd529b5fad3d4b233/tuf/developer_tool.py#L518 the "location_in_repository" arg has a default value of ''
and if not changed when creating a new object of type Project
on line 650:
https://github.com/theupdateframework/tuf/blob/b309e1befaa1df1df5afd25cd529b5fad3d4b233/tuf/developer_tool.py#L650 will cause an exception in the init function
because of the file_prefix argument.
Please verify and check that the pull request fulfills the following
requirements: