Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
954dc9bc
Commit
954dc9bc
authored
Mar 22, 2013
by
Stratos Psomadakis
Browse files
Fix deref before None check in http pool
parent
946451e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-common/synnefo/lib/pool/http.py
View file @
954dc9bc
...
...
@@ -37,7 +37,7 @@ from select import select
from
httplib
import
(
HTTPConnection
as
http_class
,
HTTPSConnection
as
https_class
,
ResponseNotReady
ResponseNotReady
,
)
from
new
import
instancemethod
...
...
@@ -106,10 +106,10 @@ class HTTPConnectionPool(ObjectPool):
# The association is broken by put_http_connection(), to prevent
# a connection object from being returned to the pool twice,
# on duplicate invocations of conn.close().
if
not
conn
.
_pool
:
conn
.
_pool
=
self
if
conn
is
None
:
return
False
if
not
conn
.
_pool
:
conn
.
_pool
=
self
sock
=
conn
.
sock
if
sock
is
None
:
return
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment