diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-09-25 13:52:35 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-09-25 13:52:35 -0300 |
commit | 50416971447ef52981e9e07d7b31d65c088d45ca (patch) | |
tree | 1985c192a4cd1763422b25a28d776cafa2dee6f5 /docs/conf.py | |
parent | 2a832507e8502ef216f4aa49e7b666766b493b98 (diff) | |
parent | b61eb20fc26c8426189a645f5aecc37644f4c8ee (diff) |
Merge remote-tracking branch 'kali/feature/bug-report-template' into develop
Diffstat (limited to 'docs/conf.py')
-rw-r--r-- | docs/conf.py | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py index 3c908b2c..3cfd0b5d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,7 +11,33 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import sys +import os + + +class Mock(object): + def __init__(self, *args, **kwargs): + pass + + def __call__(self, *args, **kwargs): + return Mock() + + @classmethod + def __getattr__(cls, name): + if name in ('__file__', '__path__'): + return '/dev/null' + elif name[0] == name[0].upper(): + mockType = type(name, (), {}) + mockType.__module__ = __name__ + return mockType + else: + return Mock() + +MOCK_MODULES = ['pysqlite', 'pyopenssl', 'pycryptopp', 'pysqlcipher'] + #'google.protobuf' + +for mod_name in MOCK_MODULES: + sys.modules[mod_name] = Mock() # 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 |