Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(23)  |  Call(23)  |  Derive(0)  |  Import(0)

src/p/r/pritunl-0.10.9/pritunl/organization.py   pritunl(Download)
            return self._get_user_count()
        elif name == 'page_total':
            return int(cache_db.get(self.get_cache_key('users_page_total')))
        return Config.__getattr__(self, name)
 
    def _cache_users(self):
        if cache_db.get(self.get_cache_key('users_cached')) != 't':
            cache_db.remove(self.get_cache_key('users'))
            certs_path = os.path.join(self.path, CERTS_DIR)
            if os.path.isdir(certs_path):
    def _get_user_count(self):
        try:
            user_count = int(cache_db.get(self.get_cache_key('user_count')))
        except TypeError:
            self._cache_users()
            user_count = int(cache_db.get(self.get_cache_key('user_count')))
    def _cache_orgs(cls):
        if cache_db.get('orgs_cached') != 't':
            cache_db.remove('orgs')
            path = os.path.join(app_server.data_path, ORGS_DIR)
            if os.path.isdir(path):

src/p/r/pritunl-HEAD/pritunl/organization.py   pritunl(Download)
            return self._get_user_count()
        elif name == 'page_total':
            return int(cache_db.get(self.get_cache_key('users_page_total')))
        return Config.__getattr__(self, name)
 
    def _cache_users(self):
        if cache_db.get(self.get_cache_key('users_cached')) != 't':
            cache_db.remove(self.get_cache_key('users'))
            certs_path = os.path.join(self.path, CERTS_DIR)
            if os.path.isdir(certs_path):
    def _get_user_count(self):
        try:
            user_count = int(cache_db.get(self.get_cache_key('user_count')))
        except TypeError:
            self._cache_users()
            user_count = int(cache_db.get(self.get_cache_key('user_count')))
    def _cache_orgs(cls):
        if cache_db.get('orgs_cached') != 't':
            cache_db.remove('orgs')
            path = os.path.join(app_server.data_path, ORGS_DIR)
            if os.path.isdir(path):

src/p/r/pritunl-0.10.9/pritunl/server.py   pritunl(Download)
    def _load_ip_pool(self):
        if cache_db.get(self.get_cache_key('ip_pool_cached')) == 't':
            return
        reset = False
 
    def _cache_servers(cls):
        if cache_db.get('servers_cached') != 't':
            cache_db.remove('servers')
            path = os.path.join(app_server.data_path, SERVERS_DIR)
            if os.path.isdir(path):

src/p/r/pritunl-HEAD/pritunl/server.py   pritunl(Download)
    def _load_ip_pool(self):
        if cache_db.get(self.get_cache_key('ip_pool_cached')) == 't':
            return
        reset = False
 
    def _cache_servers(cls):
        if cache_db.get('servers_cached') != 't':
            cache_db.remove('servers')
            path = os.path.join(app_server.data_path, SERVERS_DIR)
            if os.path.isdir(path):

src/p/r/pritunl-HEAD/pritunl/user.py   pritunl(Download)
    def verify_otp_code(self, code, remote_ip=None):
        if remote_ip:
            otp_cache = cache_db.get(self.get_cache_key('otp_cache'))
            if otp_cache:
                cur_code, cur_remote_ip = otp_cache.split(',')

src/p/r/pritunl-0.10.9/pritunl/config.py   pritunl(Download)
            if not hasattr(self, 'id'):
                raise ValueError('Object ID is required for caching')
            if cache_db.get(self.get_cache_key('cached')) == 't':
                if merge:
                    for name, value in cache_db.dict_get_all(

src/p/r/pritunl-0.10.9/pritunl/app_server.py   pritunl(Download)
                return False
        elif name == 'localhost_ip':
            localhost_ip = cache_db.get('localhost_ip')
            if not localhost_ip:
                try:

src/p/r/pritunl-HEAD/pritunl/config.py   pritunl(Download)
            if not hasattr(self, 'id'):
                raise ValueError('Object ID is required for caching')
            if cache_db.get(self.get_cache_key('cached')) == 't':
                if merge:
                    for name, value in cache_db.dict_get_all(

src/p/r/pritunl-HEAD/pritunl/app_server.py   pritunl(Download)
                return False
        elif name == 'localhost_ip':
            localhost_ip = cache_db.get('localhost_ip')
            if not localhost_ip:
                try: