

def check_connection(self):
    '\n        Connect to Mongo, save connection in self.connection\n        and return status and message\n        '
    try:
        self.connection = pymongo.Connection(self.host, self.port, slave_okay=True, replicaSet=e.replicaset)
    except Exception as e:
        return {
            'state': 'ERROR',
            'messages': {
                'error': [str(e)],
            },
        }
    return {
        'state': 'OK',
        'messages': {
            'info': [self.connection.server_info()['sysInfo']],
        },
    }

dataset/ETHPy150Open gooddata/smoker/smoker/server/plugins/mongo.py Plugin.check_connection/VarMisuse@38/78 `self`->`e`