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

Implement logging and additional exception handling #7

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

tbowers7
Copy link
Member

Logging implemented (rather than just print to screen), but will print to stdout if no logger passed in.

Additional error catching for various situations seen during the routine running.

Documentation cleanup and some variable name changes for clarity.

	renamed:    johnnyfive/old_email.py -> ToyModels/old_email.py
	modified:   johnnyfive/gmail.py
	modified:   johnnyfive/utils.py
	modified:   johnnyfive/confluence.py
	modified:   johnnyfive/gmail.py
	modified:   johnnyfive/slack.py
	modified:   johnnyfive/utils.py
	modified:   setup.py
	modified:   johnnyfive/confluence.py
	modified:   johnnyfive/gmail.py
	modified:   johnnyfive/utils.py
@tbowers7 tbowers7 force-pushed the api_changes branch 5 times, most recently from 47184a2 to f4e8906 Compare November 30, 2022 00:44
	modified:   johnnyfive/confluence.py
	modified:   johnnyfive/gmail.py
	modified:   johnnyfive/slack.py
	modified:   johnnyfive/utils.py
tbowers7 added 3 commits June 19, 2023 17:52
	modified:   README.md
	modified:   johnnyfive/gmail.py
The `pkg_resources` package is being deprecated in favor of `importlib`
modules `resources` and `metadata`.  This commit updates this package
to be in line with this change.

	modified:   johnnyfive/confluence.py
	modified:   johnnyfive/gmail.py
	modified:   johnnyfive/utils.py
In the case where a GMAIL message has multiple "parts" (i.e., HTML,
images, etc.), the payload['body'] dictionary element is empty, and
what would be there is as a list in the 'parts' element.  In the simple
case where the GMAIL message is text only, there is only one part (as
is the case with relay DOL messages -- the test case when developing
this class).

This commit adds a check for the 'parts' dictionary element, and selects
the first PART, if such a list exists.  Otherwise, the usual behavior of
extracting the payload['body'] dictionary element holds.  This works
with the hand-delivered DOL messages of the past few days (the mail
relay is down due to IT issues), but no guarantee is made or implied
that this fix will be appropriate or work in all use cases of this
j5 class.

	modified:   johnnyfive/gmail.py
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.

1 participant