Skip to content

Commit

Permalink
gracefully fall back from py3 (#48)
Browse files Browse the repository at this point in the history
...kind of a pointless nicety since neither seem to work, but...
  • Loading branch information
maphew committed Jun 14, 2015
1 parent d34fab2 commit e6c7063
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
import shlex

# https://read-the-docs.readthedocs.org/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
#from mock import Mock as MagicMock
#py27 import
from unittest.mock import MagicMock
try:
#py3 import

from unittest.mock import MagicMock
except ImportError:
#py27 import
from mock import Mock as MagicMock

class Mock(MagickMock):
@classmethod
def __getattr__(cls, name):
Expand Down
8 changes: 4 additions & 4 deletions docs/source/index.rst.leo
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<vnodes>
<v t="maphew.20150613204824.4"><vh>@persistence</vh>
<v t="maphew.20150613204824.5" a="E"><vh>@data:@auto conf.py</vh>
<v t="maphew.20150613204824.9"><vh>@gnxs</vh></v>
<v t="maphew.20150613204824.11"><vh>@gnxs</vh></v>
</v>
</v>
<v t="maphew.20150601230033.5" a="E"><vh>Apt - Read The Docs</vh>
Expand All @@ -24,11 +24,11 @@
<tnodes>
<t tx="maphew.20150601230033.5">@path b:\code\apt\docs\source
</t>
<t tx="maphew.20150613204824.11">gnx: maphew.20150613204824.3
unl: conf declarations
</t>
<t tx="maphew.20150613204824.4"></t>
<t tx="maphew.20150613204824.5">gnx: maphew.20150613204824.2
</t>
<t tx="maphew.20150613204824.9">gnx: maphew.20150613204824.3
unl: conf declarations
</t>
</tnodes>
</leo_file>

0 comments on commit e6c7063

Please sign in to comment.