socket.close should be called directly
Bug #1666117 reported by
Takanori Miyagishi
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
networking-fujitsu |
New
|
Low
|
Takanori Miyagishi |
Bug Description
The "disconnect" method is defined at common/
However socket.close() returns None regardless connection is established or not. Therefore, the method is actually meaningless. socket.close should be called directly
The following codes and result shows socket.close finished without any exceptions when socket is not established:
- Code
```
import socket
testsocket = socket.
try:
res = testsocket.close()
except:
print "exception is occurred."
else:
print "exception is not occurred."
```
- Result
$ python2.7 ./socket_test.py
exception is not occurred.
Changed in networking-fujitsu: | |
importance: | Undecided → Low |
description: | updated |
Changed in networking-fujitsu: | |
assignee: | nobody → Takanori Miyagishi (miyagishi-t) |
To post a comment you must log in.