MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

Lib/test/support/smtpd.py:125–162  ·  view source on GitHub ↗
(self, server, conn, addr, data_size_limit=DATA_SIZE_DEFAULT,
                 map=None, enable_SMTPUTF8=False, decode_data=False)

Source from the content-addressed store, hash-verified

123 return self.command_size_limit
124
125 def __init__(self, server, conn, addr, data_size_limit=DATA_SIZE_DEFAULT,
126 map=None, enable_SMTPUTF8=False, decode_data=False):
127 asynchat.async_chat.__init__(self, conn, map=map)
128 self.smtp_server = server
129 self.conn = conn
130 self.addr = addr
131 self.data_size_limit = data_size_limit
132 self.enable_SMTPUTF8 = enable_SMTPUTF8
133 self._decode_data = decode_data
134 if enable_SMTPUTF8 and decode_data:
135 raise ValueError("decode_data and enable_SMTPUTF8 cannot"
136 " be set to True at the same time")
137 if decode_data:
138 self._emptystring = ''
139 self._linesep = '\r\n'
140 self._dotsep = '.'
141 self._newline = NEWLINE
142 else:
143 self._emptystring = b''
144 self._linesep = b'\r\n'
145 self._dotsep = ord(b'.')
146 self._newline = b'\n'
147 self._set_rset_state()
148 self.seen_greeting = ''
149 self.extended_smtp = False
150 self.command_size_limits.clear()
151 self.fqdn = socket.getfqdn()
152 try:
153 self.peer = conn.getpeername()
154 except OSError as err:
155 # a race condition may occur if the other end is closing
156 # before we can get the peername
157 self.close()
158 if err.errno != errno.ENOTCONN:
159 raise
160 return
161 print('Peer:', repr(self.peer), file=DEBUGSTREAM)
162 self.push('220 %s %s' % (self.fqdn, __version__))
163
164 def _set_post_data_state(self):
165 """Reset state variables to their post-DATA state."""

Callers

nothing calls this directly

Calls 9

_set_rset_stateMethod · 0.95
pushMethod · 0.95
ordFunction · 0.85
reprFunction · 0.85
printFunction · 0.50
__init__Method · 0.45
clearMethod · 0.45
getpeernameMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected