[Zope3-checkins] SVN: Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/ftp.py Added some backward compatibility code.

Jim Fulton jim at zope.com
Fri Sep 2 16:53:06 EDT 2005


Log message for revision 38255:
  Added some backward compatibility code.
  

Changed:
  U   Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/ftp.py

-=-
Modified: Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/ftp.py
===================================================================
--- Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/ftp.py	2005-09-02 20:53:02 UTC (rev 38254)
+++ Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/ftp.py	2005-09-02 20:53:05 UTC (rev 38255)
@@ -39,8 +39,18 @@
 
     __slots__ = '_auth'
 
-    def __init__(self, body_instream, environ, response=None):
-        self._auth = environ.get('credentials')
+    # XXX BBB
+    def __init__(self, body_instream, environ, response=None, bbb=None):
+        try:
+            self._auth = environ.get('credentials')
+        except AttributeError:
+            import warnings
+            warnings.warn("Can't pass output streams to requests anymore",
+                          DeprecationWarning,
+                          2)
+            environ, response = response, bbb
+            self._auth = environ.get('credentials')
+            
         del environ['credentials']
 
         super(FTPRequest, self).__init__(body_instream, environ, response)



More information about the Zope3-Checkins mailing list