| Server IP : 82.208.35.60 / Your IP : 216.73.216.238 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/mail/notmuch/files/ |
Upload File : |
--- bindings/python/docs/source/conf.py.orig 2019-03-02 23:40:44 UTC
+++ bindings/python/docs/source/conf.py
@@ -13,7 +13,19 @@
import sys, os
-from unittest.mock import Mock
+try:
+ from unittest.mock import Mock
+except ImportError:
+ class Mock(object):
+ def __init__(self, *args, **kwargs):
+ pass
+
+ def __call__(self, *args, **kwargs):
+ return Mock()
+
+ @classmethod
+ def __getattr__(self, name):
+ return Mock() if name not in ('__file__', '__path__') else '/dev/null'
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the