mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 21:01:27 -07:00
Imports should be near the top of the file
Prior to 2.1, imports of module_utils was actually a preprocessor-like substitution. So importing at the bottom helped preserve line numbers when debugging. We'll be moving these to the top of files as time goes on. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
This commit is contained in:
parent
04e6a207bd
commit
a01bf7ffff
1 changed files with 3 additions and 4 deletions
|
@ -113,6 +113,9 @@ EXAMPLES = '''
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import *
|
||||||
|
from ansible.module_utils.ec2 import *
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import boto.ec2
|
import boto.ec2
|
||||||
from boto.s3.connection import OrdinaryCallingFormat, Location
|
from boto.s3.connection import OrdinaryCallingFormat, Location
|
||||||
|
@ -445,9 +448,5 @@ def main():
|
||||||
elif state == 'absent':
|
elif state == 'absent':
|
||||||
destroy_bucket(connection, module, flavour=flavour)
|
destroy_bucket(connection, module, flavour=flavour)
|
||||||
|
|
||||||
from ansible.module_utils.basic import *
|
|
||||||
from ansible.module_utils.ec2 import *
|
|
||||||
import urlparse
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue