fix: correct indentation error in Python debugging script
All checks were successful
audit / audit (push) Has been skipped
ci-cd / build (push) Has been skipped
ci / build (push) Has been skipped
autofix / fix (push) Has been skipped
security-scanning / audit (push) Has been skipped
test / test (push) Has been skipped
ci-cd / deploy (push) Has been skipped
ci / deploy (push) Has been skipped

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.
This commit is contained in:
2026-03-27 20:46:50 +01:00
parent 4464ab05f4
commit 536f7afbcc

View File

@@ -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..."