Commit 8590e148 authored by Georgios D. Tsoukalas's avatar Georgios D. Tsoukalas
Browse files

pithos: don't crash in sqlite backend pools

parent 044a616e
...@@ -120,13 +120,18 @@ class PithosBackendPool(ObjectPool): ...@@ -120,13 +120,18 @@ class PithosBackendPool(ObjectPool):
try: try:
fd = conn.connection.connection.fileno() fd = conn.connection.connection.fileno()
r, w, x = select([fd], (), (), 0) except AttributeError:
if r: # probably sqlite, assume success
conn.close() pass
else:
try:
r, w, x = select([fd], (), (), 0)
if r:
conn.close()
return False
except:
print_exc()
return False return False
except:
print_exc()
return False
return True return True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment