MongoDB: Only compare major, minor version numbers when sniffing server version. Closes #29. Thanks to stefanw

This commit is contained in:
Ask Solem 2011-03-29 23:15:14 +02:00
parent b5a05dd27a
commit a7c549fb54
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ class Channel(virtual.Channel):
mongoconn = Connection(host=conninfo.hostname, port=conninfo.port)
dbname = conninfo.virtual_host
version = mongoconn.server_info()["version"]
if tuple(map(int, version.split("."))) < (1, 3):
if tuple(map(int, version.split(".")[:2])) < (1, 3):
raise NotImplementedError(
"Kombu requires MongoDB version 1.3+, but connected to %s" % (
version, ))