Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bankedit.py: remove redundant memory_changed function #1204

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

Patronics
Copy link
Contributor

Now that the _cell_changing method handles both cases, memory_changed is redundant.

@kk7ds
Copy link
Owner

kk7ds commented Dec 17, 2024

This fails on a radio with an actual index:

ERROR: <function ChirpBankEdit._cell_changing at 0x1223ab370> raised unexpected exception
Traceback (most recent call last):
  File "/Users/dan/Documents/chirp.git/chirp/wxui/common.py", line 642, in run_safe
    return fn(*args, **kwargs)
  File "/Users/dan/Documents/chirp.git/chirp/wxui/bankedit.py", line 225, in _cell_changing
    self._change_memory_index(self.row2mem(row), int(value))
ValueError: invalid literal for int() with base 10: ''

You can use the tests/images/Icom_IC-2820H.img to test. Haven't looked at why, but should be trivial.

@kk7ds
Copy link
Owner

kk7ds commented Dec 17, 2024

Slightly more obscure than I was thinking, we get the changing event before the actual value has been edited, so we just need to not try to int() the empty value.

@kk7ds kk7ds merged commit 605037d into kk7ds:master Dec 17, 2024
6 checks passed
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