Ubuntu Pastebin

Paste from Laney at Thu, 9 Mar 2017 17:55:36 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
>>> try:
...     smtplib.SMTP('localhost', 222)
... except smtplib.SMTPException as err:
...     print('foo')
... 
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/usr/lib/python3.2/smtplib.py", line 260, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python3.2/smtplib.py", line 320, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python3.2/smtplib.py", line 295, in _get_socket
    return socket.create_connection((host, port), timeout)
  File "/usr/lib/python3.2/socket.py", line 404, in create_connection
    raise err
  File "/usr/lib/python3.2/socket.py", line 395, in create_connection
    sock.connect(sa)
socket.error: [Errno 111] Connection refused
Download as text