airflow/contrib/hooks/mongo_hook.py
def get_conn(self):
        """
        Fetches PyMongo Client
        """
        if self.client is not None:
            return self.client

        # Mongo Connection Options dict that is unpacked when passed to MongoClient
        options = self.extras

        # If we are using SSL disable requiring certs from specific hostname
        if options.get('ssl', False):
            options.update({'ssl_cert_reqs': CERT_NONE})

        self.client = MongoClient(self.uri, **options)

        return self.client
def get_conn(self):
        """
        Fetches PyMongo Client
        """
        if self.client is not None:
            return self.client

        # Mongo Connection Options dict that is unpacked when passed to MongoClient
        options = self.extras

        # If we are using SSL disable requiring certs from specific hostname
        if options.get('ssl', False):
            options.update({'ssl_cert_reqs': CERT_NONE})

        self.client = MongoClient(self.uri, **options)

        return self.client
def get_conn ( self ) : if self . client is not None : return self . client # Mongo Connection Options dict that is unpacked when passed to MongoClient options = self . extras # If we are using SSL disable requiring certs from specific hostname if options . get ( 'ssl' , False ) : options . update ( { 'ssl_cert_reqs' : CERT_NONE } ) self . client = MongoClient ( self . uri , * * options ) return self . client
Fetches PyMongo Client
Fetches PyMongo Client