]> granicus.if.org Git - python/commit
Do not raise exception on close() on account of socket attribute still being None:
authorGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 9 Apr 2013 15:21:25 +0000 (17:21 +0200)
committerGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 9 Apr 2013 15:21:25 +0000 (17:21 +0200)
commita4c377cde9b010f6bee5e5e0a15e8545228d31e2
treecbb04d46c81bd15a4d5f401542b3ed57a6d90637
parentfa1b02a126ef6b6ce58b2ea595a97384ae616593
Do not raise exception on close() on account of socket attribute still being None:

>>> import asyncore
>>> d = asyncore.dispatcher()
>>> d.close()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/asyncore.py", line 401, in close
    self.socket.close()
AttributeError: 'NoneType' object has no attribute 'close'
>>>
Lib/asyncore.py