fix(bbs_service): resolve NameError in _abbrev_table that crashed !h and !help(#v1.14.1)

_abbrev_table used a list comprehension inline inside a generator
expression filter. In Python 3, list comprehensions have their own
scope, so the loop variable 'cu' was not visible to the outer 'if'
condition — causing a NameError on every !h / !help DM command.

Extract the comprehension to a local variable 'cats_upper' so both
the iteration and the filter operate on the same pre-built list.
This commit is contained in:
pe1hvh
2026-03-16 11:20:55 +01:00
parent 298760f861
commit 8836d9dd6e
23 changed files with 197 additions and 3722 deletions
+9 -6
View File
@@ -64,13 +64,16 @@ fi
CURRENT_USER="$(whoami)"
VENV_PYTHON="${PROJECT_DIR}/venv/bin/python"
# Check venv
# Check venv / bootstrap dependencies when missing
if [[ ! -x "${VENV_PYTHON}" ]]; then
error "Virtual environment not found at: ${VENV_PYTHON}
Create it first:
python3 -m venv venv
source venv/bin/activate
pip install meshcore nicegui meshcoredecoder"
info "Virtual environment not found. Creating project venv..."
python3 -m venv "${PROJECT_DIR}/venv"
info "Installing required Python packages into the venv..."
# shellcheck disable=SC1091
source "${PROJECT_DIR}/venv/bin/activate"
pip install nicegui meshcore meshcoredecoder
ok "Virtual environment created and dependencies installed"
fi
# Determine the entry point