c2cgeoportal-commons 2.8.1.190__py3-none-any.whl → 2.8.1.191__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of c2cgeoportal-commons might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013-2021, Camptocamp SA
1
+ # Copyright (c) 2013-2025, Camptocamp SA
2
2
  # All rights reserved.
3
3
 
4
4
  # Redistribution and use in source and binary forms, with or without
@@ -74,15 +74,11 @@ def send_email(
74
74
  msg["Subject"] = subject
75
75
  msg.attach(MIMEText(body, "plain", "utf-8"))
76
76
 
77
- # Connect to server
78
- if smtp_config.get("ssl", False):
79
- smtp: smtplib.SMTP = smtplib.SMTP_SSL(smtp_config["host"])
80
- else:
81
- smtp = smtplib.SMTP(smtp_config["host"])
82
- if smtp_config.get("starttls", False):
83
- smtp.starttls()
84
- if smtp_config.get("user", False):
85
- smtp.login(smtp_config["user"], smtp_config["password"])
86
-
87
- smtp.sendmail(from_addr, to_address, msg.as_string())
88
- smtp.close()
77
+ SMTPClass = smtplib.SMTP_SSL if smtp_config.get("ssl", False) else smtplib.SMTP # noqa
78
+ with SMTPClass(smtp_config["host"]) as smtp:
79
+ if smtp_config.get("starttls", False):
80
+ smtp.starttls()
81
+ if smtp_config.get("user", False):
82
+ smtp.login(smtp_config["user"], smtp_config["password"])
83
+
84
+ smtp.sendmail(from_addr, to_address, msg.as_string())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: c2cgeoportal-commons
3
- Version: 2.8.1.190
3
+ Version: 2.8.1.191
4
4
  Summary: c2cgeoportal commons
5
5
  Home-page: https://github.com/camptocamp/c2cgeoportal/
6
6
  Author: Camptocamp
@@ -65,7 +65,7 @@ c2cgeoportal_commons/alembic/static/7ef947f30f20_add_oauth2_tables.py,sha256=hTh
65
65
  c2cgeoportal_commons/alembic/static/ae5e88f35669_add_table_user_role.py,sha256=4v7UT-xINHvob9djWXn20lK5vorMBw4vNgmxq8uEe9U,3423
66
66
  c2cgeoportal_commons/alembic/static/bd029dbfc11a_fill_tech_data_column.py,sha256=F7ess8AZSp-D86IM8sFFmD0nKBTlwc5HMK28PrqAr5s,2119
67
67
  c2cgeoportal_commons/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
- c2cgeoportal_commons/lib/email_.py,sha256=VAtXpFhenezZopzcQI1e-QgcJihMu3R1kzjmUQO_Nos,3485
68
+ c2cgeoportal_commons/lib/email_.py,sha256=2W5c9gv9hADs2dEIwip1zfjomxQ4nAUb7rB1NmGW08s,3441
69
69
  c2cgeoportal_commons/lib/literal.py,sha256=450WdbYHt7tKd7t6nz7OB8D61BqyC1UdK12HvsrhvoQ,2036
70
70
  c2cgeoportal_commons/lib/url.py,sha256=aQxb5zZWOTpD5KfO-BRk5UrJduEoAUIDgrlSoPZagiE,8304
71
71
  c2cgeoportal_commons/lib/validators.py,sha256=dF0Qlg6ghMrxwNqV675Juz5fIx9-58f4JimV7SC-sqc,1805
@@ -77,7 +77,7 @@ c2cgeoportal_commons/testing/__init__.py,sha256=SqwPvhUmaQuiekPCpOQePb6jV1tHFTlM
77
77
  c2cgeoportal_commons/testing/initializedb.py,sha256=mNBT_rPjxukWG5DIVX1rAmeNCZpCQvxICxigVuDr3_0,3155
78
78
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
79
  tests/conftest.py,sha256=kxgBqWJQ3vEy7yoW-NBhBp8yLOVLiObC5O69gZLE9Ws,1449
80
- c2cgeoportal_commons-2.8.1.190.dist-info/METADATA,sha256=XtHah_rS0GFlgnsCCkoiXPa8zvw5vQUvNBYA5E9Jn7Q,1914
81
- c2cgeoportal_commons-2.8.1.190.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
82
- c2cgeoportal_commons-2.8.1.190.dist-info/top_level.txt,sha256=NWDBsLJav5VgJVX1XzTwUvFShioh9XSi5IaJU_9_YDc,27
83
- c2cgeoportal_commons-2.8.1.190.dist-info/RECORD,,
80
+ c2cgeoportal_commons-2.8.1.191.dist-info/METADATA,sha256=Q_EBe015eREfGtFuiv0Ece2kyv-wO_2kk-jaxXdAVwg,1914
81
+ c2cgeoportal_commons-2.8.1.191.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
82
+ c2cgeoportal_commons-2.8.1.191.dist-info/top_level.txt,sha256=NWDBsLJav5VgJVX1XzTwUvFShioh9XSi5IaJU_9_YDc,27
83
+ c2cgeoportal_commons-2.8.1.191.dist-info/RECORD,,