-
Notifications
You must be signed in to change notification settings - Fork 41
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
Continue on errror #118
Continue on errror #118
Conversation
…into cont_on_error_and_log
Codecov Report
@@ Coverage Diff @@
## develop #118 +/- ##
===========================================
- Coverage 99.05% 96.79% -2.27%
===========================================
Files 6 7 +1
Lines 319 374 +55
===========================================
+ Hits 316 362 +46
- Misses 3 12 +9
Continue to review full report at Codecov.
|
I see that the code fails to run on Python 2, but should we still deal with Python 2 given that it is an unsupported language? Also I don't know how to address the codecov problems. |
This pull request should also address issue #96 |
@awdeorio the unit test that is failing is for a python version that is out of support. DO you really want me to fix that specific error? |
Thanks for your patience. I know I've been slow on this and #114. I'll take a closer look at this after finishing up #114 and getting it merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow review. Thanks for your contributions! I left some comments.
@@ -10,7 +10,8 @@ | |||
import click | |||
from .template_message import TemplateMessage | |||
from .sendmail_client import SendmailClient | |||
from . import exceptions | |||
from .exceptions import MailmergeError | |||
from .log import MailmergeLog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would lean towards using Python's standard library logging mechanism over building a custom logger.
@@ -79,9 +84,15 @@ | |||
type=click.Choice(["colorized", "text", "raw"]), | |||
help="Output format (colorized).", | |||
) | |||
@click.option( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that creating a log by default is reasonable. Maybe we can just call it mailmerge.log
? That would simplify the command line interface.
.format(message_num=message_num), | ||
output_format, | ||
) | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this logic can be simplified after merging in the latest upstream develop. That includes a try-except block in the message send part.
@@ -0,0 +1,116 @@ | |||
# coding=utf-8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More ideas for tests:
- Log file already exists
Continueing this work in PR #124 |
As a user I work with email addresses that I get from an external party (in this case abuse email addreses from ipinfo.io)
Sometimes these email addresses contain errors that cause the smtp server to report them back to me and fail. I would like it if the software automatically continues/resumes with the next record instead of having to do that manually.
Also I would like to have a log file (in csv format) so that I know which email were not sent.