Beispiel #1
0
def is_prelaunch_host(host):
    is_prelaunch = False
    prelaunch_host_regexps = htk_setting('HTK_PRELAUNCH_HOST_REGEXPS', HTK_PRELAUNCH_HOST_REGEXPS)
    for prelaunch_host_regexp in prelaunch_host_regexps:
        match = re.match(prelaunch_host_regexp, host)
        is_prelaunch = match is not None
        if is_prelaunch:
            break
    if settings.TEST:
        from htk.test_scaffold.models import TestScaffold
        fake_prelaunch_host = TestScaffold.get_fake_prelaunch_host()
        if fake_prelaunch_host is not None:
            is_prelaunch = fake_prelaunch_host
    return is_prelaunch
Beispiel #2
0
def is_prelaunch_host(host):
    is_prelaunch = False
    prelaunch_host_regexps = htk_setting('HTK_PRELAUNCH_HOST_REGEXPS', HTK_PRELAUNCH_HOST_REGEXPS)
    for prelaunch_host_regexp in prelaunch_host_regexps:
        match = re.match(prelaunch_host_regexp, host)
        is_prelaunch = match is not None
        if is_prelaunch:
            break
    if settings.TEST:
        from htk.test_scaffold.models import TestScaffold
        fake_prelaunch_host = TestScaffold.get_fake_prelaunch_host()
        if fake_prelaunch_host is not None:
            is_prelaunch = fake_prelaunch_host
    return is_prelaunch