diff --git a/VERSION b/VERSION index a22f82f8..5a361e35 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.5.1-stable+timestamp.2013.06.16.03.25.54 +Version 2.5.1-stable+timestamp.2013.06.16.06.51.32 diff --git a/gluon/dal.py b/gluon/dal.py index a8d95c96..695b2d71 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -5223,18 +5223,14 @@ class MongoDBAdapter(NoSQLAdapter): m = {"database" : m[1]} if m.get('database')==None: raise SyntaxError("Database is required!") + def connector(uri=self.uri,m=m): - try: - # Connection() is deprecated - if hasattr(self.driver, "MongoClient"): - Connection = self.driver.MongoClient - else: - Connection = self.driver.Connection - return Connection(uri)[m.get('database')] - except self.driver.errors.ConnectionFailure: - inst = sys.exc_info()[1] - raise SyntaxError("The connection to " + - uri + " could not be made") + # Connection() is deprecated + if hasattr(self.driver, "MongoClient"): + Connection = self.driver.MongoClient + else: + Connection = self.driver.Connection + return Connection(uri)[m.get('database')] self.reconnect(connector,cursor=False)