-1 Sorry, but changing an ID generator will break some Permalinks if the messages are ever reparsed.
It will also cause duplicate messages if the messages are ever exported and re-imported without deleting the originals. A possible work-round is to create a new version of the medium generator that fixes this issue. New installations can then use that if they wish. But existing installations cannot just change ID generator and hope that things will be OK On 19 August 2017 at 07:11, <[email protected]> wrote: > Repository: incubator-ponymail > Updated Branches: > refs/heads/master be430c666 -> 58ce843d7 > > > Make sure we have a body, or ID generation will fail. > > If body is None, PM tries to encode it and fails, falling back > on the legacy ID generator, which is not guaranteed to be > the same across the board. Fix this by setting the body > to an empty string if not found. > > > Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo > Commit: > http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/58ce843d > Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/58ce843d > Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/58ce843d > > Branch: refs/heads/master > Commit: 58ce843d79d413f3d3b49647d26f33b41ec9ff2d > Parents: be430c6 > Author: Daniel Gruno <[email protected]> > Authored: Sat Aug 19 08:11:00 2017 +0200 > Committer: Daniel Gruno <[email protected]> > Committed: Sat Aug 19 08:11:00 2017 +0200 > > ---------------------------------------------------------------------- > CHANGELOG.md | 1 + > tools/generators.py | 4 ++++ > 2 files changed, 5 insertions(+) > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/58ce843d/CHANGELOG.md > ---------------------------------------------------------------------- > diff --git a/CHANGELOG.md b/CHANGELOG.md > index 05fab5d..e180827 100644 > --- a/CHANGELOG.md > +++ b/CHANGELOG.md > @@ -1,4 +1,5 @@ > ## CHANGES in 0.10: > +- Fixed an issue with ID generation where an email body does not exist > - Fixed an issue where favorites could contain null entries due to missing > GC (#392) > - Added sample configs for Pony Mail (#374) > - Renamed ll.py to list-lists.py (#378) > > http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/58ce843d/tools/generators.py > ---------------------------------------------------------------------- > diff --git a/tools/generators.py b/tools/generators.py > index 2ac2ca8..d8c373d 100644 > --- a/tools/generators.py > +++ b/tools/generators.py > @@ -55,6 +55,8 @@ def medium(msg, body, lid, attachments): > attachments - list of attachments (not used) > """ > # Use text body > + if not body: # Make sure body is not None, which will fail. > + body = "" > xbody = body if type(body) is bytes else body.encode('ascii', 'ignore') > # Use List ID > xbody += bytes(lid, encoding='ascii') > @@ -94,6 +96,8 @@ def redundant(msg, body, lid, attachments): > attachments - list of attachments (uses the hashes) > """ > # Use text body > + if not body: # Make sure body is not None, which will fail. > + body = "" > xbody = body if type(body) is bytes else body.encode('ascii', 'ignore') > # Use List ID > xbody += bytes(lid, encoding='ascii') >
