~divmod-dev/divmod.org/trunk

« back to all changes in this revision

Viewing changes to Epsilon/epsilon/hotfixes/proto_helpers_stringtransport.py

  • Committer: Jean-Paul Calderone
  • Date: 2014-06-29 20:33:04 UTC
  • mfrom: (2749.1.1 remove-epsilon-1325289)
  • Revision ID: exarkun@twistedmatrix.com-20140629203304-gdkmbwl1suei4m97
mergeĀ lp:~exarkun/divmod.org/remove-epsilon-1325289

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from twisted.test import proto_helpers
2
 
 
3
 
class StringTransport:
4
 
 
5
 
    def write(self, data):
6
 
        if isinstance(data, unicode): # no, really, I mean it
7
 
            raise TypeError("Data must not be unicode")
8
 
        self.io.write(data)
9
 
 
10
 
def install():
11
 
    proto_helpers.StringTransport.__dict__['write'] = StringTransport.__dict__['write']