Repository navigation
Option to specify profile - #1420
Open
railadeividas wants to merge 3 commits into
Open
railadeividas wants to merge 3 commits into
railadeividas wants to merge 3 commits into
Conversation
Algirdas-Z
approved these changes
Apr 4, 2025
|
@fviard please check |
fviard
requested changes
Oct 27, 2025
fviard
left a comment
Contributor
There was a problem hiding this comment.
Thank you very much for your PR that is quite good and would solve an issue that is encountered by quite a few users and sorry for the long delay for my feedback.
If it would still be possible for you, there is a little change of behavior for this feature that I would prefer:
- Currently, for the s3cfg file, it will read one section or another (so either the default or the profile one).
- I think that it would be better to always try to load the "default" section, and to then optionally load the "profile" on top of that.
- It would probably be easy to do a first version with a slight modification of your code.
Something like creating the ConfigParser with the "[default]" sections, and then if there is the profile, use the "parse_file(...)" function of this cp instance with the "profile" as [sections].
I think that it would be better because if you have to copy paste all the common options in all your profiles, there is not that much any interest compared to use multiple config files. But with this, you could have a common (default) config and just put the specific parts inside each profile.
I added 2 nitpicks directly in review comments.
|
@fviard I have updated and tested the code to always load default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Allow having few profiles in default config .s3cfg