sys.exit(0)
    else:
        print()

    # if queue file exists, give user option to continue last run
    queue_file_name = io_handler.get_queue_file_name()
    if not random_queue:
        delete_queue = False
        if os.path.isfile(queue_file_name):
            delete_queue = input(
                'Queue file found, continue aborted run (Y/N).  Choosing N will delete existing queue file: ')
            if delete_queue:
                os.remove(queue_file_name)
                print('DELETED: Existing queue.txt')
    else:
        queue_file_name = utilities.create_unique_queue_file_name()
        io_handler.set_queue_file_name(queue_file_name)
        string = f'Random queue file option selected. Queue file: {queue_file_name}'
        print(string)
        logger.debug(string)
        cont = input("Continue Y/N? ")
        if cont.lower() != "y":
            sys.exit()



    io_handler.write_queue_file(audio_set)
    print(f'WRITE: {queue_file_name}\n')

    confirm = input(f'models: {models} \n'
                    f'enhanced: {enhance}\n'
Exemplo n.º 2
0
def test_create_unique_queue_file_name():
    from utilities.utilities import Utilities
    u = Utilities()
    result = u.create_unique_queue_file_name()
    assert 'queue' in result