New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
edit-list: handle config consistently #448
Conversation
Read the config file regardless of what dir the script was called. Signed-off-by: Dimid Duchovny <dimidd@gmail.com>
I'm generally in favor of this change, but it may be breaking existing behavior, so it should at the very least be noted in the changelog that this is a potential breaking change. |
Perhaps to prevent breaking existing code we can check if the PWD has |
Agreed: only check tools/ if cannot find config in PWD. [Later] As per below, I now think it's confusing to pick up config from the current directory |
I think that's a very good compromise :) |
I've had a look at how the other tools behave. Currently, archiver.py and import-mbox.py both read ponymail.cfg from the parent directory. I think the current situation is confusing: I would expect all the tools to behave the same way. So although this will change the behaviour, I now think it might be best for all the tools to work the same as archiver and import-mbox. |
Then perhaps we should abstract it into its own module?
2018-05-14 13:04 GMT+03:00 sebbASF <notifications@github.com>:
… I've had a look at how the other tools behave.
Currently, archiver.py and import-mbox.py both read ponymail.cfg from the
parent directory.
Whereas the other tools/ scripts read from the CWD.
I think the current situation is confusing: I would expect all the tools
to behave the same way.
So although this will change the behaviour, I now think it might be best
for all the tools to work the same as archiver and import-mbox.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#448 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADhEto7N1hPHJbdRWD41knBKuPI2GGw6ks5tyVaWgaJpZM4T4ClT>
.
|
elastic.py was an attempt to extract some of the common processing into a separate module. |
Allow handling pony config files consistently. Signed-off-by: Dimid Duchovny <dimidd@gmail.com>
There is now a config module: https://github.com/apache/incubator-ponymail/blob/master/tools/ponymailconfig.py This has been used in some scripts. |
As I wrote previously, I don't think it makes sense to default to using the config file from the current directory. Whilst perhaps convenient for testing, it is confusing to have multiple potential sources. I think all scripts should use the config in tools/ to ensure consistency. |
OK, then this PR is redundant. |
Read the config file regardless of what dir the script was called.
Signed-off-by: Dimid Duchovny dimidd@gmail.com