You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ponymail.apache.org by "sbp (via GitHub)" <gi...@apache.org> on 2024/08/09 12:54:31 UTC
[PR] Fix es not being in scope when using dedup and dry together [incubator-ponymail-foal]
sbp opened a new pull request, #264:
URL: https://github.com/apache/incubator-ponymail-foal/pull/264
The `tools/import-mbox.py` script does not work when `--dedup` and `--dry` are used in conjunction due to the `es` variable not being in scope during the deduplication operation. This is due to `es` not being constructed as a global when `--dry` is set. This PR fixes that by creating a function to construct the `es` variable, and using that selectively when `--dry` is run so that `es` is only, clearly, used to get metadata for deduplication.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ponymail.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix es not being in scope when using dedup and dry together [incubator-ponymail-foal]
Posted by "sebbASF (via GitHub)" <gi...@apache.org>.
sebbASF commented on PR #264:
URL: https://github.com/apache/incubator-ponymail-foal/pull/264#issuecomment-4902483199
I'm not sure it makes sense to allow dedup with dry
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ponymail.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix es not being in scope when using dedup and dry together [incubator-ponymail-foal]
Posted by "sbp (via GitHub)" <gi...@apache.org>.
sbp commented on code in PR #264:
URL: https://github.com/apache/incubator-ponymail-foal/pull/264#discussion_r1711414484
##########
tools/import-mbox.py:
##########
@@ -166,7 +166,7 @@ def printid(self, message):
print("%s: %s" % (self.name, message))
def run(self):
- global goodies, baddies, dedupped
+ global goodies, baddies, dedupped, es
Review Comment:
If `es` isn't declared as a global here then using `--dedup` without `--dry` breaks because the `es = ...` assignment on L346 makes it a local.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ponymail.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org