Commit 7c3c5087 authored by Hanno Schlichting's avatar Hanno Schlichting

Removed fallback code for old Python versions from `ZServer.FTPServer.zope_ftp_channel.push`.

parent 75877c02
...@@ -22,6 +22,9 @@ Bugs Fixed ...@@ -22,6 +22,9 @@ Bugs Fixed
Restructuring Restructuring
+++++++++++++ +++++++++++++
- Removed fallback code for old Python versions from
`ZServer.FTPServer.zope_ftp_channel.push`.
- Removed fallback code for old `ZCatalog.catalog_object` function signatures - Removed fallback code for old `ZCatalog.catalog_object` function signatures
from `Products.ZCatalog.ZCatalog.reindexIndex`. from `Products.ZCatalog.ZCatalog.reindexIndex`.
......
...@@ -64,7 +64,6 @@ FTP Authorization ...@@ -64,7 +64,6 @@ FTP Authorization
""" """
import sys
from PubCore import handle from PubCore import handle
from medusa.ftp_server import ftp_channel, ftp_server, recv_channel from medusa.ftp_server import ftp_channel, ftp_server, recv_channel
import asyncore, asynchat import asyncore, asynchat
...@@ -82,8 +81,6 @@ import marshal ...@@ -82,8 +81,6 @@ import marshal
import stat import stat
import time import time
py26_or_later = sys.version_info >= (2,6)
class zope_ftp_channel(ftp_channel): class zope_ftp_channel(ftp_channel):
"Passes its commands to Zope, not a filesystem" "Passes its commands to Zope, not a filesystem"
...@@ -113,18 +110,13 @@ class zope_ftp_channel(ftp_channel): ...@@ -113,18 +110,13 @@ class zope_ftp_channel(ftp_channel):
# note, that strings are not wrapped in # note, that strings are not wrapped in
# producers by default # producers by default
# LP #418454 # LP #418454, Python 2.6 or later
if py26_or_later:
# Python 2.6 or later
sabs = self.ac_out_buffer_size sabs = self.ac_out_buffer_size
if len(data) > sabs: if len(data) > sabs:
for i in xrange(0, len(data), sabs): for i in xrange(0, len(data), sabs):
self.producer_fifo.append(data[i:i+sabs]) self.producer_fifo.append(data[i:i+sabs])
else: else:
self.producer_fifo.append(data) self.producer_fifo.append(data)
else:
# pre-Python 2.6
self.producer_fifo.push(data)
if send: if send:
self.initiate_send() self.initiate_send()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment