Avoid referencing an uninitialized SMTP server on connect failure
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start in src/restic_compose_backup/alerts/smtp.py at SMTPAlert.send() and trace the SMTP/SMTP_SSL connection and finally block. Exercise a connection-refused or DNS failure, then verify that cleanup does not raise UnboundLocalError and the original connection exception is preserved.
Written by the indexing model from the issue text.
Description
In src/restic_compose_backup/alerts/smtp.py, SMTPAlert.send() references server in its finally block, but server is assigned only after the SMTP/SMTP_SSL constructor succeeds. If the connection attempt raises (for example, connection refused or DNS failure), the finally block raises UnboundLocalError and masks the original connection exception. Please only close an initialized server and preserve the original connection error.
- Dominant language
- Python
- Stars
- 181
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lawndoc/stack-back
-
Maintenance QuestionOpen
Difficulty 1/5 Under an hour Newbie friendliness 20/100
lawndoc/stack-back#119 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
lawndoc/stack-back#115 ·
-
Feature request: Atomic backup mode for single snapshot for volumes + databasesPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
lawndoc/stack-back#110 · 1 comment ·
-
Feature Request: Pre/Post-Backup Hooks and Ordered Backup ExecutionPossibly taken @muebau claimed this 211 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
lawndoc/stack-back#108 · 1 comment ·
-
feat: Create backup/snapshot per container/compose projectPossibly taken @Abestanis claimed this 42 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
lawndoc/stack-back#106 · 1 comment ·
All issues in lawndoc/stack-back
Similar issues
-
customer-reported question
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Azure/azure-sdk-for-python#49548 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
btclib-org/btclib-wallet#409 ·
Maintainers usually reply within 1 day
-
Phase 2 PSA Capability & Career Profile
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
bcgov/digital-journeys#2310 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fastmachinelearning/hls4ml#1582 ·
Maintainers usually reply within 3 days
-
Sort modelsOpenenhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day