Skip to content

Commit

Permalink
Merge pull request #448 from paysni/main
Browse files Browse the repository at this point in the history
SMB and smtp fix
  • Loading branch information
Sean-Pickering committed Dec 18, 2023
2 parents f6ef2f3 + cc3e046 commit 32ed190
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.12.0-alpha.2
2.12.3
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ packages = [
]
readme = "readme.md"
repository = "https://github.com/atlas-bi/Hub"
version = "2.12.1"
version = "2.12.3"

[tool.poetry.dependencies]
Flask = "^2.0.1"
Expand Down
4 changes: 2 additions & 2 deletions runner/scripts/em_smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ def save(self, overwrite: int, file_name: str) -> str: # type: ignore[return]
Path(
(
Path(
sanitize_filename(self.subfolder)
/ sanitize_filename(self.task.project.name or "")
Path(sanitize_filename(self.subfolder or ""))
/ Path(sanitize_filename(self.task.project.name or ""))
)
if self.subfolder
else Path(sanitize_filename(self.task.project.name or ""))
Expand Down
9 changes: 7 additions & 2 deletions runner/scripts/em_smtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ def __send_ssms(self) -> None:
if app.config.get("SMTP_USE_TLS", False):
mail_server.starttls()
mail_server.ehlo()

if app.config.get("SMTP_USERNAME"):
mail_server.login(
app.config["SMTP_USERNAME"],
app.config.get("SMTP_PASSWORD", None),
Expand Down Expand Up @@ -145,6 +143,13 @@ def __send_mail(self) -> None:
)

mail_server.ehlo()
if app.config.get("SMTP_USE_TLS", False):
mail_server.starttls()
mail_server.ehlo()
mail_server.login(
app.config["SMTP_USERNAME"],
app.config.get("SMTP_PASSWORD", None),
)
mail_server.sendmail(
app.config["SMTP_SENDER_EMAIL"], self.mailto, self.msg.as_string()
)
Expand Down

0 comments on commit 32ed190

Please sign in to comment.