refactor(enable_deauth): extract duplicated behave logic to helper#30
Open
CoderFX wants to merge 3 commits intoSniffleupagus:mainfrom
Open
refactor(enable_deauth): extract duplicated behave logic to helper#30CoderFX wants to merge 3 commits intoSniffleupagus:mainfrom
CoderFX wants to merge 3 commits intoSniffleupagus:mainfrom
Conversation
- Replace bare `except Exception` with `except ImportError` for Touch_UI import - Replace deprecated `logging.warn()` with `logging.warning()` - Add consistent [Enable_Deauth] prefix to all log messages - Remove trailing semicolons - Use logging.warning for errors instead of logging.info - Bump version to 1.0.1
- Remove unused self._current_aps list (never read anywhere) - Remove stale TODO comment about web UI (never implemented) - Fix inconsistent log prefix: [EnableDeauth] -> [Enable_Deauth] - Remove unused Touch_Screen import - Remove unnecessary try/except in on_ui_update - Bump version to 1.0.2
The home network detection code was duplicated between on_unfiltered_ap_list and on_bcap_wifi_ap_new, including the label toggling logic. Extract into _set_behave() helper. Also simplifies on_unfiltered_ap_list using any() generator. - Bump version to 1.0.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The home network detection code was duplicated between
on_unfiltered_ap_listandon_bcap_wifi_ap_new, including identical label toggling logic._set_behave()helper methodon_unfiltered_ap_listusingany()generatoron_bcap_wifi_ap_newnow delegates to_set_behave()No behavior change — just DRY refactor.
Builds on #29. Related to #24.