diff options
-rw-r--r-- | NEWS | 13 | ||||
-rw-r--r-- | debian/changelog | 16 | ||||
-rw-r--r-- | distixlib/ticket_store.py | 15 | ||||
-rw-r--r-- | distixlib/version.py | 4 |
4 files changed, 38 insertions, 10 deletions
@@ -4,7 +4,18 @@ NEWS for distix, a distributed ticketing system This file contains release notes and other newsworthy bits about distix, a distributed ticketing system. -Version 0.12+git, not yet released +Version 0.14+git, not yet released +---------------------------------- + + +Version 0.14, released 2017-04-14 +---------------------------------- + +* Fix check for whether an email has already been imported. This used + to (sometimes?) not work, resulting in every new mail becoming a new + ticket. + +Version 0.13, released 2017-04-11 ---------------------------------- * Speed up imports by improving check for whether a message has diff --git a/debian/changelog b/debian/changelog index 433045a..e78b98c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,20 @@ -distix (0.12+git-1) UNRELEASED; urgency=medium +distix (0.14+git-1) UNRELEASED; urgency=medium * New upstream version. - -- Lars Wirzenius <liw@liw.fi> Wed, 22 Mar 2017 22:46:26 +0200 + -- Lars Wirzenius <liw@liw.fi> Fri, 14 Apr 2017 11:48:26 +0300 + +distix (0.14-1) unstable; urgency=medium + + * New upstream version. + + -- Lars Wirzenius <liw@liw.fi> Fri, 14 Apr 2017 11:48:24 +0300 + +distix (0.13-1) unstable; urgency=medium + + * New upstream version. + + -- Lars Wirzenius <liw@liw.fi> Tue, 11 Apr 2017 19:56:37 +0300 distix (0.12-1) unstable; urgency=medium diff --git a/distixlib/ticket_store.py b/distixlib/ticket_store.py index fdf5b02..14f4eaf 100644 --- a/distixlib/ticket_store.py +++ b/distixlib/ticket_store.py @@ -16,6 +16,7 @@ # =*= License: GPL-3+ =*= +import email import os import distixlib @@ -202,12 +203,16 @@ class TicketStore(object): return message_filenames - def _file_contains(self, filename, data): # pragma: no cover - st = os.lstat(filename) - if st.st_size != len(data): - return False + def _file_contains(self, filename, data): # pragma: no cover Note + # that the email.Message class may reformat headers, so that + # msg.as_string() doesn't return the pristine original message + # text. Thus we can't just compare file content with data. + # Instead we load the file content into a message, let any + # reformatting happen, and then compare msg.as_string() with + # data. with open(filename) as f: - return f.read() == data + msg = email.message_from_file(f) + return msg.as_string() == data class _TicketCache(object): diff --git a/distixlib/version.py b/distixlib/version.py index b107890..107122c 100644 --- a/distixlib/version.py +++ b/distixlib/version.py @@ -1,2 +1,2 @@ -__version__ = "0.12+git" -__version_info__ = (0, 12, '+git') +__version__ = "0.14+git" +__version_info__ = (0, 14, '+git') |