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

Make resilient to callbacks throwing exceptions #40

Merged
merged 1 commit into from
Jul 10, 2020

Conversation

ocalvo
Copy link
Contributor

@ocalvo ocalvo commented Jul 9, 2020

Gammu ReadDevice could (for example) execute a callback if an SMS message has been received, if this callback throws, it will bring the thread down and the worker will not work anymore.

This change address that by protecting the call to ReadDevice and execute the callback with the exception that was raised.

@codecov
Copy link

codecov bot commented Jul 9, 2020

Codecov Report

Merging #40 into master will increase coverage by 0.00%.
The diff coverage is 58.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #40   +/-   ##
=======================================
  Coverage   40.84%   40.85%           
=======================================
  Files          49       49           
  Lines        1944     1951    +7     
  Branches      230      230           
=======================================
+ Hits          794      797    +3     
- Misses       1123     1127    +4     
  Partials       27       27           
Impacted Files Coverage Δ
gammu/worker.py 85.82% <54.54%> (-2.37%) ⬇️
setup.py 54.54% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1e52b9...291a9b9. Read the comment docs.

@nijel nijel merged commit 0cfd632 into gammu:master Jul 10, 2020
@nijel
Copy link
Member

nijel commented Jul 10, 2020

Merged, thanks for your contribution!

@ocalvo
Copy link
Contributor Author

ocalvo commented Jul 11, 2020

Thanks.
Can you release version 3.1?

@ocalvo ocalvo deleted the HandleErrorFromCallback branch July 12, 2020 17:16
@ocalvo
Copy link
Contributor Author

ocalvo commented Jul 12, 2020

Merged, thanks for your contribution!

@nijel Can you release 3.1?

@nijel
Copy link
Member

nijel commented Jul 12, 2020

Yes, I will release it eventually, I'm just too busy to do it right now.

@ocalvo
Copy link
Contributor Author

ocalvo commented Jul 13, 2020

Yes, I will release it eventually, I'm just too busy to do it right now.

I made an stupid mistake in this PR, please merge this: #41

@nijel
Copy link
Member

nijel commented Jul 24, 2020

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