Add __iter__ and next options to doc/conf.py

This allows sphinx to build without autodoc errors on mock objects
that should be iterable.

Also added versionadded tags to the snapper module and state.
This commit is contained in:
rallytime 2016-12-20 11:50:43 -07:00
parent b8c16094c4
commit b31c2412ca
3 changed files with 11 additions and 0 deletions

View file

@ -49,6 +49,13 @@ class Mock(object):
else:
data = Mock(mapping=self.__mapping)
return data
def __iter__(self):
return self
def next(self):
raise StopIteration
# pylint: enable=R0903
MOCK_MODULES = [

View file

@ -2,6 +2,8 @@
'''
Module to manage filesystem snapshots with snapper
.. versionadded:: 2016.11.0
:codeauthor: Duncan Mac-Vicar P. <dmacvicar@suse.de>
:codeauthor: Pablo Suárez Hernández <psuarezhernandez@suse.de>

View file

@ -3,6 +3,8 @@
Managing implicit state and baselines using snapshots
=====================================================
.. versionadded:: 2016.11.0
Salt can manage state against explicitly defined state, for example
if your minion state is defined by: