Skip to content

Commit 8561f55

Browse files
committed
Don't catch all exceptions in Server methods
1 parent 61b4409 commit 8561f55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

couchdb/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def __nonzero__(self):
113113
try:
114114
self.resource.head()
115115
return True
116-
except:
116+
except http.ResourceNotFound:
117117
return False
118118

119119
def __bool__(self):
@@ -391,7 +391,7 @@ def __nonzero__(self):
391391
try:
392392
self.resource.head()
393393
return True
394-
except:
394+
except http.ResourceNotFound:
395395
return False
396396

397397
def __bool__(self):

0 commit comments

Comments
 (0)