From a7c549fb5477abab9139eed4e444e37c2a4697fd Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 29 Mar 2011 23:15:14 +0200 Subject: [PATCH] MongoDB: Only compare major, minor version numbers when sniffing server version. Closes #29. Thanks to stefanw --- kombu/transport/mongodb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kombu/transport/mongodb.py b/kombu/transport/mongodb.py index e7221938..a2ec6a9a 100644 --- a/kombu/transport/mongodb.py +++ b/kombu/transport/mongodb.py @@ -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, ))