[Zope3-checkins] CVS: Zope3/src/zope/app/mail - maildir.py:1.3

Marius Gedminas mgedmin@codeworks.lt
Tue, 1 Jul 2003 05:47:23 -0400


Update of /cvs-repository/Zope3/src/zope/app/mail
In directory cvs.zope.org:/tmp/cvs-serv2563/src/zope/app/mail

Modified Files:
	maildir.py 
Log Message:
Get rid of deprecation warnings in maildir module tests with Python 2.3.


=== Zope3/src/zope/app/mail/maildir.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/mail/maildir.py:1.2	Mon Jun 30 18:44:38 2003
+++ Zope3/src/zope/app/mail/maildir.py	Tue Jul  1 05:46:52 2003
@@ -101,10 +101,13 @@
 
     implements(IMaildirMessageWriter)
 
+    # A hook for unit tests
+    open = open
+
     def __init__(self, filename, new_filename):
         self._filename = filename
         self._new_filename = new_filename
-        self._fd = open(filename, 'w')
+        self._fd = self.open(filename, 'w')
         self._closed = False
         self._aborted = False