Skip to content

Commit

Permalink
Only apply platform patch on Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker committed Dec 18, 2024
1 parent 4c657b1 commit 3f22d81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,13 +471,13 @@ def py2_doctest_init(self, checker=None, verbose=None, optionflags=0):
doctest.DocTestRunner.__init__(self, checker, verbose, optionflags)

if 'doctest' in sys.argv:
def setup(app):
app.add_builder(PlatformDocTestBuilder, override=True)
# app.connect('autodoc-skip-member', dont_skip_any_doctests)

if sys.version_info[:1] < (3,):
sphinx.ext.doctest.SphinxDocTestRunner.__init__ = py2_doctest_init
else:
def setup(app):
app.add_builder(PlatformDocTestBuilder, override=True)
# app.connect('autodoc-skip-member', dont_skip_any_doctests)
# monkey patching paramiko due to https://github.com/paramiko/paramiko/pull/1661
import paramiko.client
import binascii
Expand Down
2 changes: 0 additions & 2 deletions pwnlib/util/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ def which(name, all = False, path=None):
>>> which('sh') # doctest: +ELLIPSIS +LINUX
'.../bin/sh'
>>> which('cmd') # doctest: +ELLIPSIS +WINDOWS
'...\\cmd.EXE'
"""
# If name is a path, do not attempt to resolve it.
if os.path.sep in name:
Expand Down

0 comments on commit 3f22d81

Please sign in to comment.