Limit sphinx version on python 2.6. (#24678)

* Limit sphinx version on python 2.6.
* Fix issues identified by rstcheck.
This commit is contained in:
Matt Clay 2017-05-17 01:00:15 +08:00 committed by GitHub
commit 9178e176b5
6 changed files with 13 additions and 10 deletions

View file

@ -33,9 +33,9 @@ Ok, let's get going with an example. We're going to use Python. For starters,
import json
date = str(datetime.datetime.now())
print json.dumps({
print(json.dumps({
"time" : date
})
}))
.. _module_testing:
@ -146,10 +146,10 @@ a lot shorter than this:
# can be added.
if rc != 0:
print json.dumps({
print(json.dumps({
"failed" : True,
"msg" : "failed setting the time"
})
}))
sys.exit(1)
# when things do not fail, we do not
@ -160,10 +160,10 @@ a lot shorter than this:
# notifiers to be used in playbooks.
date = str(datetime.datetime.now())
print json.dumps({
print(json.dumps({
"time" : date,
"changed" : True
})
}))
sys.exit(0)
# if no parameters are sent, the module may or
@ -171,9 +171,9 @@ a lot shorter than this:
# return the time
date = str(datetime.datetime.now())
print json.dumps({
print(json.dumps({
"time" : date
})
}))
Let's test that module::