def needs_to_auth(self, dbname):
        log_debug("Checking if server '%s' needs to auth on  db '%s'...." %
                  (self.id, dbname))
        try:
            client = self.get_mongo_client()
            db = client.get_database(dbname)
            db.collection_names()
            result = False
        except (RuntimeError,Exception), e:
            log_exception(e)
            result = "authorized" in str(e)

        log_debug("needs_to_auth check for server '%s'  on db '%s' : %s" %
                  (self.id, dbname, result))
        return result

    ###########################################################################
Determines if the server needs to authenticate to the database.
dataset/ETHPy150Open mongolab/mongoctl/mongoctl/objects/server.py/Server.needs_to_auth