Esempio n. 1
0
def check_dependencies(tmp_dir):
    '''
    This method is used by the BurnerGUI at the start
    of the application and on a retry.
    '''

    # looking for an internet connection
    if is_internet():
        debugger('Internet connection detected')
    else:
        debugger('No internet connection found')
        return INTERNET_ERROR

    # checking all necessary tools are installed
    if verify_tools():
        debugger('All necessary tools have been found')
    else:
        debugger('[ERROR] Not all tools are present')
        return TOOLS_ERROR

    # making sure we have enough space to download OS
    if is_sufficient_space(tmp_dir, REQUIRED_MB):
        debugger('Sufficient available space')
    else:
        debugger('Insufficient available space (min {} MB)'.format(REQUIRED_MB))
        return FREE_SPACE_ERROR

    # everything is ok, return successful and no error
    debugger('All dependencies were met')
    return None
Esempio n. 2
0
def check_dependencies():
    '''
    This method is used by the BurnerGUI at the start
    of the application and on a retry.
    '''

    # looking for an internet connection
    if is_internet():
        debugger('Internet connection detected')
    else:
        debugger('No internet connection detected')
        return INTERNET_ERROR

    # making sure the tools folder is there
    if verify_tools():
        debugger('All necessary tools have been found')
    else:
        debugger('[ERROR] Not all tools are present')
        return TOOLS_ERROR

    # making sure we have enough space to download OS
    if is_sufficient_space():
        debugger('Sufficient available space')
    else:
        debugger(
            'Insufficient available space (min {} MB)'.format(REQUIRED_MB))
        return FREE_SPACE_ERROR

    # everything is ok, return successful and no error
    debugger('All dependencies were met')
    return None
Esempio n. 3
0
def check_dependencies():
    '''
    This method is used by the BurnerGUI at the start
    of the application and on a retry.
    '''

    # looking for an internet connection
    if is_internet():
        debugger('Internet connection detected')
    else:
        debugger('No internet connection found')
        return INTERNET_ERROR

    # checking all necessary tools are installed
    if verify_tools():
        debugger('All necessary tools have been found')
    else:
        debugger('[ERROR] Not all tools are present')
        return TOOLS_ERROR

    # grabbing the required amount of free space from the servers
    required_mb = get_required_mb()
    if not required_mb:
        debugger('[ERROR] Could not reach server, they may be down')
        return SERVER_DOWN_ERROR

    # making sure we have enough space to download OS
    if is_sufficient_space(required_mb):
        debugger('Sufficient available space (min {} MB)'.format(required_mb))
    else:
        debugger(
            'Insufficient available space (min {} MB)'.format(required_mb))
        return FREE_SPACE_ERROR

    # everything is ok, return successful and no error
    debugger('All dependencies were met')
    return None
Esempio n. 4
0
def check_dependencies():
    '''
    This method is used by the BurnerGUI at the start
    of the application and on a retry.
    '''

    # looking for an internet connection
    if is_internet():
        debugger('Internet connection detected')
    else:
        debugger('No internet connection detected')
        return INTERNET_ERROR

    # making sure the tools folder is there
    if verify_tools():
        debugger('All necessary tools have been found')
    else:
        debugger('[ERROR] Not all tools are present')
        return TOOLS_ERROR

    # making sure we have enough space to download OS
    required_mb = get_required_mb()
    if not required_mb:
        debugger('[ERROR] Could not reach server, they may be down')
        return SERVER_DOWN_ERROR

    # making sure we have enough space to download OS
    if is_sufficient_space(required_mb):
        debugger('Sufficient available space (min {} MB)'.format(required_mb))
    else:
        debugger('Insufficient available space (min {} MB)'.format(required_mb))
        return FREE_SPACE_ERROR

    # everything is ok, return successful and no error
    debugger('All dependencies were met')
    return None