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

Hardening of custom plugin loading by ignore non-Python files #853

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

caronc
Copy link
Owner

@caronc caronc commented Mar 17, 2023

Description:

Related issue (if applicable): here

When Adding Plugin Support to the Apprise API, I learned that the Apprise service can't handle cases where it finds a plugin module that isn't a Python file. It tries to open it and blows up :). This shouldn't happen and has been corrected in this PR.

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@plugin-module-load-filter-bugfix

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  <apprise url related to ticket>

@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (2057107) 100.00% compared to head (6a824f3) 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #853   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          118       118           
  Lines        15366     15373    +7     
  Branches      3153      3154    +1     
=========================================
+ Hits         15366     15373    +7     
Impacted Files Coverage Δ
apprise/utils.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@caronc caronc merged commit 6144a79 into master Mar 17, 2023
@caronc caronc deleted the plugin-module-load-filter-bugfix branch May 13, 2023 02:12
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.

None yet

2 participants