Skip to content

Conversation

@ZLLentz
Copy link
Member

@ZLLentz ZLLentz commented Jan 26, 2026

Description

Fix an issue with parsing vlan names without "-" in them- for now, ignore these
Try to keep the overall behavior the same, including order added to the list

Also run pre-commit to solve one of the CI build errors

Motivation and Context

This was crashing the gui for xpp

$ switchtool -s swh-xpp-h3
Traceback (most recent call last):
  File "/cds/group/pcds/pyps/apps/switchtool/R2.0.0/switchtool/ui/widgets/switch.py", line 330, in refresh
    if v not in vl and allvlan[v].split("-")[1] == "CDS":
                       ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
/cds/group/pcds/pyps/apps/switchtool/latest/scripts/switchtool: line 17: 1058446 Aborted                 (core dumped) python "$RELDIR"/scripts/switch_gui.py "$@"

How Has This Been Tested?

Interactively only

Where Has This Been Documented?

Here only

Pre-merge checklist

  • Code works interactively
  • Code follows the style guide
  • Code contains descriptive docstrings, including context and API
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions
  • Ran docs/pre-release-notes.sh and created a pre-release documentation page
  • Pre-release docs include context, functional descriptions, and contributors as appropriate

@ZLLentz ZLLentz marked this pull request as ready for review January 26, 2026 22:54
@ZLLentz ZLLentz requested a review from a team as a code owner January 26, 2026 22:54
Copy link
Contributor

@tangkong tangkong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ZLLentz ZLLentz merged commit 88c8776 into pcdshub:master Jan 27, 2026
2 of 7 checks passed
@ZLLentz ZLLentz deleted the fix_vlan_index_error branch January 27, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants