mirror of https://github.com/celery/kombu.git
MongoDB: Only compare major, minor version numbers when sniffing server version. Closes #29. Thanks to stefanw
This commit is contained in:
parent
b5a05dd27a
commit
a7c549fb54
|
@ -59,7 +59,7 @@ class Channel(virtual.Channel):
|
||||||
mongoconn = Connection(host=conninfo.hostname, port=conninfo.port)
|
mongoconn = Connection(host=conninfo.hostname, port=conninfo.port)
|
||||||
dbname = conninfo.virtual_host
|
dbname = conninfo.virtual_host
|
||||||
version = mongoconn.server_info()["version"]
|
version = mongoconn.server_info()["version"]
|
||||||
if tuple(map(int, version.split("."))) < (1, 3):
|
if tuple(map(int, version.split(".")[:2])) < (1, 3):
|
||||||
raise NotImplementedError(
|
raise NotImplementedError(
|
||||||
"Kombu requires MongoDB version 1.3+, but connected to %s" % (
|
"Kombu requires MongoDB version 1.3+, but connected to %s" % (
|
||||||
version, ))
|
version, ))
|
||||||
|
|
Loading…
Reference in New Issue