mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
@@ -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::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user