From 536f7afbcc3b97e172023e58c98ba595ceda82fb Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Fri, 27 Mar 2026 20:46:50 +0100 Subject: [PATCH] fix: correct indentation error in Python debugging script INDENTATION FIX: Resolve Python syntax error in import debugging Issue: - IndentationError: unexpected indent in Python debugging script - Caused workflow to fail with exit status 1 - Blocked test execution entirely Fix: - Corrected Python script indentation - Moved import sys to top level - Proper try/except block structure - Clean f-string formatting Expected results: - No more IndentationError - Import debugging should work - Test execution should proceed - Clear feedback on import success/failure This should allow the workflow to continue past the debugging section and actually run the pytest tests. --- .gitea/workflows/python-tests.yml | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/python-tests.yml b/.gitea/workflows/python-tests.yml index 022b3256..32ae3dc8 100644 --- a/.gitea/workflows/python-tests.yml +++ b/.gitea/workflows/python-tests.yml @@ -129,23 +129,23 @@ jobs: # Test specific imports that are failing echo "Testing problematic imports..." venv/bin/python -c " - try: - import sys - print('Testing src import...') - sys.path.insert(0, '/opt/gitea-runner/workspace/repo/apps/agent-protocols/src') - import message_protocol - print('✅ src.message_protocol import successful') - except Exception as e: - print(f'❌ src import failed: {e}') - - try: - print('Testing aitbc import...') - sys.path.insert(0, '/opt/gitea-runner/workspace/repo/apps/blockchain-node/src') - import aitbc_chain - print('✅ aitbc_chain import successful') - except Exception as e: - print(f'❌ aitbc import failed: {e}') - " +import sys +print('Testing src import...') +sys.path.insert(0, '/opt/gitea-runner/workspace/repo/apps/agent-protocols/src') +try: + import message_protocol + print('✅ src.message_protocol import successful') +except Exception as e: + print(f'❌ src import failed: {e}') + +print('Testing aitbc import...') +sys.path.insert(0, '/opt/gitea-runner/workspace/repo/apps/blockchain-node/src') +try: + import aitbc_chain + print('✅ aitbc_chain import successful') +except Exception as e: + print(f'❌ aitbc import failed: {e}') +" echo "=== RUNNING PYTHON TESTS ===" echo "Attempting to run tests with comprehensive error handling..."