We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8561f55 commit 3af398fCopy full SHA for 3af398f
couchdb/client.py
@@ -31,6 +31,7 @@
31
from textwrap import dedent
32
import warnings
33
import sys
34
+import socket
35
36
from couchdb import http, json, util
37
@@ -95,7 +96,7 @@ def __contains__(self, name):
95
96
try:
97
self.resource.head(name)
98
return True
- except http.ResourceNotFound:
99
+ except (socket.error, http.ResourceNotFound):
100
return False
101
102
def __iter__(self):
@@ -113,7 +114,7 @@ def __nonzero__(self):
113
114
115
self.resource.head()
116
117
118
119
120
def __bool__(self):
0 commit comments