diff options
author | Cheng-Lung Sung <clsung@FreeBSD.org> | 2005-03-04 03:59:52 +0000 |
---|---|---|
committer | Cheng-Lung Sung <clsung@FreeBSD.org> | 2005-03-04 03:59:52 +0000 |
commit | abd6b52bad8277704331e01c4603eb12c73046ba (patch) | |
tree | fd02b09713832a521e6ada74cf52c48a1cb78567 /mail/getmail | |
parent | add fig2pstricks 0.6.6 (diff) |
- Add two patches to mail/getmail to tell modules not to use "strict"
when program is executed with Python 2.4 or newer.
- bump PORTREVISION
PR: 77896
Submitted by: Linh Pham (maintainer)
Notes
Notes:
svn path=/head/; revision=130317
Diffstat (limited to 'mail/getmail')
-rw-r--r-- | mail/getmail/Makefile | 1 | ||||
-rw-r--r-- | mail/getmail/files/patch-message.py | 43 | ||||
-rw-r--r-- | mail/getmail/files/patch-retrieverbases.py | 23 |
3 files changed, 67 insertions, 0 deletions
diff --git a/mail/getmail/Makefile b/mail/getmail/Makefile index 98b7b5b903c8..71c36d4e1886 100644 --- a/mail/getmail/Makefile +++ b/mail/getmail/Makefile @@ -7,6 +7,7 @@ PORTNAME= getmail PORTVERSION= 4.3.3 +PORTREVISION= 1 CATEGORIES= mail python MASTER_SITES= http://pyropus.ca/software/getmail/%SUBDIR%/ MASTER_SITE_SUBDIR= old-versions diff --git a/mail/getmail/files/patch-message.py b/mail/getmail/files/patch-message.py new file mode 100644 index 000000000000..a19abc720dc0 --- /dev/null +++ b/mail/getmail/files/patch-message.py @@ -0,0 +1,43 @@ +--- getmailcore/message.py.orig Mon Feb 21 15:57:08 2005 ++++ getmailcore/message.py Mon Feb 21 16:04:17 2005 +@@ -7,6 +7,7 @@ + 'Message', + ] + ++import sys + import os + import time + import cStringIO +@@ -86,20 +87,28 @@ + # of filters, etc, which should be saner. + if fromlines: + try: +- self.__msg = email.message_from_string(os.linesep.join( +- fromlines), strict=False) ++ if sys.version_info < (2, 4): ++ self.__msg = email.message_from_string(os.linesep.join(fromlines), strict=False) ++ else: ++ self.__msg = email.message_from_string(os.linesep.join(fromlines)) + except email.Errors.MessageError, o: + self.__msg = corrupt_message(o, fromlines=fromlines) + self.__raw = os.linesep.join(fromlines) + elif fromstring: + try: +- self.__msg = email.message_from_string(fromstring, strict=False) ++ if sys.version_info < (2, 4): ++ self.__msg = email.message_from_string(fromstring, strict=False) ++ else: ++ self.__msg = email.message_from_string(fromstring) + except email.Errors.MessageError, o: + self.__msg = corrupt_message(o, fromstring=fromstring) + self.__raw = fromstring + elif fromfile: + try: +- self.__msg = email.message_from_file(fromfile, strict=False) ++ if sys.version_info < (2, 4): ++ self.__msg = email.message_from_file(fromfile, strict=False) ++ else: ++ self.__msg = email.message_from_file(fromfile) + except email.Errors.MessageError, o: + # Shouldn't happen + self.__msg = corrupt_message(o, fromstring=fromfile.read()) diff --git a/mail/getmail/files/patch-retrieverbases.py b/mail/getmail/files/patch-retrieverbases.py new file mode 100644 index 000000000000..46c6659f8d13 --- /dev/null +++ b/mail/getmail/files/patch-retrieverbases.py @@ -0,0 +1,23 @@ +--- getmailcore/_retrieverbases.py.orig Mon Feb 21 15:57:08 2005 ++++ getmailcore/_retrieverbases.py Mon Feb 21 15:59:11 2005 +@@ -33,6 +33,7 @@ + 'RetrieverSkeleton', + ] + ++import sys + import os + import socket + import time +@@ -445,7 +446,11 @@ + self.log.trace() + msgnum = self._getmsgnumbyid(msgid) + response, headerlist, octets = self.conn.top(msgnum, 0) +- parser = email.Parser.Parser(strict=False) ++ # 'strict' argument is deprecated in Python 2.4 ++ if sys.version_info < (2, 4): ++ parser = email.Parser.Parser(strict=False) ++ else: ++ parser = email.Parser.Parser() + return parser.parsestr(os.linesep.join(headerlist), headersonly=True) + + def initialize(self): |