Back to index

moin  1.9.0~rc2
Public Member Functions | Private Attributes
MoinMoin.support.werkzeug.contrib.lint.InputStream Class Reference

List of all members.

Public Member Functions

def __init__
def read
def readline
def __iter__
def close

Private Attributes

 _stream

Detailed Description

Definition at line 43 of file lint.py.


Constructor & Destructor Documentation

Definition at line 45 of file lint.py.

00045 
00046     def __init__(self, stream):
00047         self._stream = stream


Member Function Documentation

Definition at line 74 of file lint.py.

00074 
00075     def __iter__(self):
00076         try:
00077             return iter(self._stream)
00078         except TypeError:
00079             warn(WSGIWarning('wsgi.input is not iterable.'), stacklevel=2)
00080             return iter(())

Definition at line 81 of file lint.py.

00081 
00082     def close(self):
00083         warn(WSGIWarning('application closed the input stream!'),
00084              stacklevel=2)
00085         self._stream.close()
00086 

Here is the caller graph for this function:

Definition at line 48 of file lint.py.

00048 
00049     def read(self, *args):
00050         if len(args) == 0:
00051             warn(WSGIWarning('wsgi does not guarantee an EOF marker on the '
00052                              'input stream, thus making calls to '
00053                              'wsgi.input.read() unsafe.  Conforming servers '
00054                              'may never return from this call.'),
00055                  stacklevel=2)
00056         elif len(args) != 1:
00057             warn(WSGIWarning('too many parameters passed to wsgi.input.read()'),
00058                  stacklevel=2)
00059         return self._stream.read(*args)

Here is the caller graph for this function:

Definition at line 60 of file lint.py.

00060 
00061     def readline(self, *args):
00062         if len(args) == 0:
00063             warn(WSGIWarning('Calls to wsgi.input.readline() without arguments'
00064                              ' are unsafe.  Use wsgi.input.read() instead.'),
00065                  stacklevel=2)
00066         elif len(args) == 1:
00067             warn(WSGIWarning('wsgi.input.readline() was called with a size hint. '
00068                              'WSGI does not support this, although it\'s available '
00069                              'on all major servers.'),
00070                  stacklevel=2)
00071         else:
00072             raise TypeError('too many arguments passed to wsgi.input.readline()')
00073         return self._stream.readline(*args)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 46 of file lint.py.


The documentation for this class was generated from the following file: