See suggestion in https://github.com/bskinn/sphobjinv/issues/275
This prevents the module from creating an ssl context upon import, when,
during a build especially, a certificate file may not be present. Otherwise
module import would fail.
--- a/src/sphobjinv/inventory.py
+++ b/src/sphobjinv/inventory.py
@@ -30,7 +30,6 @@ Sphinx |objects.inv| files.
"""
import re
-import ssl
import urllib.request as urlrq
from zlib import error as zlib_error
@@ -218,8 +217,15 @@ class Inventory:
#: zlib compression line for v2 |objects.inv| header
header_zlib = "# The remainder of this file is compressed using zlib."
- # Private class member for SSL context, since context creation is slow(?)
- _sslcontext = ssl.create_default_context(cafile=certifi.where())
+ # Private class member for SSL context
+ _sslcontext_ = None
+
+ @property
+ def _sslcontext(self):
+ import ssl
+ if not self._sslcontext_:
+ self._sslcontext_ = ssl.create_default_context(cafile=certifi.where())
+ return self._sslcontext_
@property
def count(self):
f86a00b3d13d6fff262a5ad'>refslogtreecommitdiff
|
Age | Commit message (Expand) | Author |
2021-11-30 | services: Accept <inferior-package>s in lieu of <package>s....* gnu/services/authentication.scm (fprintd-configuration)
(nslcd-configuration): Substitute file-like objects for package ones.
* gnu/services/cgit.scm (cgit-configuration, opaque-cgit-configuration):
Likewise.
* gnu/services/cups.scm (package-list?, cups-configuration): Likewise.
* gnu/services/dns.scm (verify-knot-configuration)
(ddclient-configuration): Likewise.
* gnu/services/docker.scm (docker-configuration): Likewise.
* gnu/services/file-sharing.scm (transmission-daemon-configuration): Likewise.
* gnu/services/getmail.scm (getmail-configuration): Likewise.
* gnu/services/mail.scm (dovecot-configuration)
(opaque-dovecot-configuration): Likewise.
* gnu/services/messaging.scm (prosody-configuration)
(opaque-prosody-configuration): Likewise.
* gnu/services/monitoring.scm (zabbix-server-configuration)
(zabbix-agent-configuration): Likewise.
* gnu/services/networking.scm (opendht-configuration): Likewise.
* gnu/services/pm.scm (tlp-configuration): Likewise.
* gnu/services/telephony.scm (jami-configuration): Likewise.
* gnu/services/virtualization.scm (libvirt-configuration)
(qemu-guest-agent-configuration): Likewise.
* gnu/services/vpn.scm (openvpn-client-configuration): Likewise.
| Tobias Geerinckx-Rice |
2020-07-27 | services: auditd: Provide default configuration directory....* gnu/services/auditd.scm (auditd.conf)
(%default-auditd-configuration-directory): New variables.
(<auditd-configuration>): Switch to 'define-record-type*'.
[configuration-directory]: New field.
(auditd-shepherd-service): Honor 'configuration-directory'. Pass #:pid-file.
(auditd-service-type)[description]: Tweak.
[default-value]: Provide 'configuration-directory'.
* doc/guix.texi (Miscellaneous Services): Update docs to reflect
changes.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Robin Green |