mirror of
https://github.com/pe1hvh/meshcore-gui.git
synced 2026-08-08 18:03:27 +02:00
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:
Executable → Regular
+9
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user