bin/check-mongodb.py in sensu-plugins-mongodb-2.0.0 vs bin/check-mongodb.py in sensu-plugins-mongodb-2.0.1
- old
+ new
@@ -329,10 +329,10 @@
print "CRITICAL - General MongoDB Error:", e
return 2
def set_read_preference(db):
- if pymongo.version >= "2.2":
+ if pymongo.version >= "2.2" and pymongo.version < "2.8":
pymongo.read_preferences.Secondary
else:
db.read_preference = pymongo.ReadPreference.SECONDARY