diff options
| author | Aurélien Bompard | 2014-10-06 15:58:58 +0200 |
|---|---|---|
| committer | Aurélien Bompard | 2014-10-06 15:58:58 +0200 |
| commit | 506b0fff2b4b1f068223d6e9cdfb254fd53bcdac (patch) | |
| tree | d5c4e598fccf67c133179c4d1156252a61c4b8dc /src/mailman/model/messagestore.py | |
| parent | cbbac03083357ca928d104d386d9e3008c937581 (diff) | |
| parent | 061799ef5031977bd343bbe54a6ad809138bdb45 (diff) | |
| download | mailman-506b0fff2b4b1f068223d6e9cdfb254fd53bcdac.tar.gz mailman-506b0fff2b4b1f068223d6e9cdfb254fd53bcdac.tar.zst mailman-506b0fff2b4b1f068223d6e9cdfb254fd53bcdac.zip | |
Diffstat (limited to 'src/mailman/model/messagestore.py')
| -rw-r--r-- | src/mailman/model/messagestore.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mailman/model/messagestore.py b/src/mailman/model/messagestore.py index 0b8a0ac78..19fa8133f 100644 --- a/src/mailman/model/messagestore.py +++ b/src/mailman/model/messagestore.py @@ -117,9 +117,8 @@ class MessageStore: def get_message_by_hash(self, store, message_id_hash): # It's possible the hash came from a message header, in which case it # will be a Unicode. However when coming from source code, it may be - # an 8-string. Coerce to the latter if necessary; it must be - # US-ASCII. - if isinstance(message_id_hash, unicode): + # bytes object. Coerce to the latter if necessary; it must be ASCII. + if not isinstance(message_id_hash, bytes): message_id_hash = message_id_hash.encode('ascii') row = store.query(Message).filter_by( message_id_hash=message_id_hash).first() |
