From 9c5c91763a516432237cbff96d4d91677dc13ce7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2020 16:15:28 +0000 Subject: [PATCH 1/5] Bump wheel from 0.36.0 to 0.36.1 Bumps [wheel](https://github.com/pypa/wheel) from 0.36.0 to 0.36.1. - [Release notes](https://github.com/pypa/wheel/releases) - [Changelog](https://github.com/pypa/wheel/blob/master/docs/news.rst) - [Commits](https://github.com/pypa/wheel/compare/0.36.0...0.36.1) Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a12a10c06..53c213153 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,3 @@ setuptools==50.3.2 twine==2.0.0 -wheel==0.36.0 +wheel==0.36.1 From dfe126904127c33bb1b1590707aa6e5aee0ec2b8 Mon Sep 17 00:00:00 2001 From: Nico Hartung Date: Mon, 4 Jan 2021 13:25:28 +0100 Subject: [PATCH 2/5] Fix for #227 - smtp smtplib server_hostname "server_hostname cannot be an empty string or start with a leading dot" --- icloudpd/email_notifications.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/icloudpd/email_notifications.py b/icloudpd/email_notifications.py index 4851b6ee7..da03daec2 100644 --- a/icloudpd/email_notifications.py +++ b/icloudpd/email_notifications.py @@ -15,7 +15,8 @@ def send_2sa_notification( from_addr = smtp_email if smtp_email else to_addr logger = setup_logger() logger.info("Sending 'two-step expired' notification via email...") - smtp = smtplib.SMTP() + #smtp = smtplib.SMTP() + smtp = smtplib.SMTP(smtp_host, smtp_port) smtp.set_debuglevel(0) smtp.connect(smtp_host, smtp_port) if not smtp_no_tls: From db7894f47b48ed3159e4986abdcc9760a7404b77 Mon Sep 17 00:00:00 2001 From: Nico Hartung Date: Mon, 4 Jan 2021 14:45:11 +0100 Subject: [PATCH 3/5] Housekeeping for PR #276 --- CHANGELOG.md | 4 ++++ icloudpd/email_notifications.py | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec51252f6..bf92c8c57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +## 1.7.2 (2021-01-04) + +- fix: smtp server_hostname cannot be an empty [#227](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/227) + ## 1.7.1 (2020-11-15) - fix: dev docker build on windows correctly manages crlf for scripts diff --git a/icloudpd/email_notifications.py b/icloudpd/email_notifications.py index da03daec2..d65608a64 100644 --- a/icloudpd/email_notifications.py +++ b/icloudpd/email_notifications.py @@ -15,7 +15,6 @@ def send_2sa_notification( from_addr = smtp_email if smtp_email else to_addr logger = setup_logger() logger.info("Sending 'two-step expired' notification via email...") - #smtp = smtplib.SMTP() smtp = smtplib.SMTP(smtp_host, smtp_port) smtp.set_debuglevel(0) smtp.connect(smtp_host, smtp_port) From ced9b4441246984d30f4b24e8616b93dcbd6184c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Menke?= Date: Mon, 4 Jan 2021 18:54:29 +0100 Subject: [PATCH 4/5] Fix for #227 - smtp smtplib server_hostname iniitial pull by @nicoh88 --- CHANGELOG.md | 2 -- icloudpd/email_notifications.py | 1 - 2 files changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf92c8c57..f8099791f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,6 @@ ## Unreleased -## 1.7.2 (2021-01-04) - - fix: smtp server_hostname cannot be an empty [#227](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/227) ## 1.7.1 (2020-11-15) diff --git a/icloudpd/email_notifications.py b/icloudpd/email_notifications.py index d65608a64..b7bc95928 100644 --- a/icloudpd/email_notifications.py +++ b/icloudpd/email_notifications.py @@ -17,7 +17,6 @@ def send_2sa_notification( logger.info("Sending 'two-step expired' notification via email...") smtp = smtplib.SMTP(smtp_host, smtp_port) smtp.set_debuglevel(0) - smtp.connect(smtp_host, smtp_port) if not smtp_no_tls: smtp.starttls() From 6b0215b671e7bd1bbf2f7d5ec2f587f75a9cb4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Menke?= Date: Mon, 4 Jan 2021 22:53:26 +0100 Subject: [PATCH 5/5] readd connect call to keep unit-tests running --- icloudpd/email_notifications.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/icloudpd/email_notifications.py b/icloudpd/email_notifications.py index b7bc95928..731314d54 100644 --- a/icloudpd/email_notifications.py +++ b/icloudpd/email_notifications.py @@ -17,6 +17,9 @@ def send_2sa_notification( logger.info("Sending 'two-step expired' notification via email...") smtp = smtplib.SMTP(smtp_host, smtp_port) smtp.set_debuglevel(0) + # leaving explicit call of connect to not break unit tests, even though it is + # called implicitly via cunstructor parameters + smtp.connect(smtp_host, smtp_port) if not smtp_no_tls: smtp.starttls()