Exemplo n.º 1
0
def default_speed_out():
    key = 'SPEED_OUT'
    user_input = int(os.environ.get(key, None))
    try:
        verify_env.import_check({key: user_input})
        verified_input = user_input
    except TypeError as e:
        print(e.__class__, "".join(e.args))
        verified_input = 1
    return verified_input
Exemplo n.º 2
0
def software_version():
    key = 'SOFTWARE_VERSION'
    user_input = os.environ.get(key, None)
    try:
        verify_env.import_check({key: user_input})
        verified_input = user_input
    except TypeError as e:
        print(e.__class__, "".join(e.args))
        verified_input = '0.9'
    return verified_input
Exemplo n.º 3
0
def standby_position():
    key = 'STANDBY_POSITION'
    user_input = int(os.environ.get(key, None))
    try:
        verify_env.import_check({key: user_input})
        verified_input = user_input
    except TypeError as e:
        print(e.__class__, "".join(e.args))
        verified_input = 1
    return verified_input
Exemplo n.º 4
0
def default_requested_position():
    key = 'DEFAULT_REQUESTED_POSITION'
    user_input = int(os.environ.get(key, None))
    try:
        verify_env.import_check({key: user_input})
        verified_input = user_input
    except TypeError as e:
        print(e.__class__, "".join(e.args))
        verified_input = 1
    return verified_input
Exemplo n.º 5
0
def default_ip():
    key = 'IP_ADDRESS'
    user_input = os.environ.get(key, None)
    try:
        verify_env.import_check({key: user_input})
        verified_input = user_input
    except TypeError as e:
        print(e.__class__, "".join(e.args))
        verified_input = '1.1.1.1'
    return verified_input
Exemplo n.º 6
0
def path_user_settings():
    key = 'USER_CONFIG'
    user_input = os.environ.get(key, None)
    try:
        verify_env.import_check({key: user_input})
        verified_input = user_input
        file_exists = 1
    except FileNotFoundError as e:
        print(e.__class__, "".join(e.args))
        verified_input = user_input
        file_exists = 0
    return [verified_input, file_exists]