Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Check if version v1 is great or equal then version v2.
    

        def version_get(v1, v2):
    """Check if version v1 is great or equal then version v2.
    """
    return [int(i) for i in v1.split('.') if i.isdigit()] > [int(i) for i in v2.split('.') if i.isdigit()]
        


src/m/o/MoleSys-HEAD/lib/serverM/mate/web.py   MoleSys(Download)
            setting['limit_conn'] = limit_conn and 'addr %s' % limit_conn or ''
            if not limit_conn_zone.isdigit(): limit_conn_zone = '10'
            if not version or utils.version_get(version, '1.1.8'):
                setting['limit_conn_zone'] = '$binary_remote_addr zone=addr:%sm' % limit_conn_zone
                setting['limit_zone'] = ''

src/m/o/MoleSys-HEAD/lib/serverM/mate/nginx.py   MoleSys(Download)
        config = loadconfig(NGINXCONF, True)
 
    if not version or utils.version_get(version, '1.1.8'):
        conn_zones = http_get('limit_conn_zone')
        if not conn_zones: