diff --git a/odoo_openupgrade_wizard/tools/tools_odoo.py b/odoo_openupgrade_wizard/tools/tools_odoo.py index ea6c971..cc58665 100644 --- a/odoo_openupgrade_wizard/tools/tools_odoo.py +++ b/odoo_openupgrade_wizard/tools/tools_odoo.py @@ -325,9 +325,9 @@ def execute_click_odoo_python_files( if os.path.isfile(os.path.join(script_folder, f)) and f[-3:] == ".py" ] - python_files = sorted(python_files) + python_files = sorted([str(x) for x in python_files]) - command = generate_odoo_command( + base_command = generate_odoo_command( ctx, migration_step, execution_context, @@ -336,16 +336,13 @@ def execute_click_odoo_python_files( ) for python_file in python_files: - command = ("/bin/bash -c 'cat /env/{python_file} | {command}'").format( - command=command, - python_file=str(python_file), - ) + command = f"/bin/bash -c 'cat /env/{python_file} | {base_command}'" try: logger.info( f"Step {migration_step['complete_name']}." f" Executing script {python_file} ..." ) - return run_container_odoo( + run_container_odoo( ctx, migration_step, command,