mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-05 07:54:00 -07:00
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:
parent
bfc551b3f8
commit
9178e176b5
6 changed files with 13 additions and 10 deletions
|
@ -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::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue