From 2c1530b647c95f871aea502a441c7fd66dafd863 Mon Sep 17 00:00:00 2001 From: "Javier M. Mellid" Date: Sat, 18 Jun 2016 00:10:18 +0200 Subject: [PATCH] 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 --- cloud/amazon/s3_bucket.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cloud/amazon/s3_bucket.py b/cloud/amazon/s3_bucket.py index 7d07f3b856d..30c0e154242 100644 --- a/cloud/amazon/s3_bucket.py +++ b/cloud/amazon/s3_bucket.py @@ -109,6 +109,9 @@ EXAMPLES = ''' import xml.etree.ElementTree as ET import urlparse +from ansible.module_utils.basic import * +from ansible.module_utils.ec2 import * + try: import boto.ec2 from boto.s3.connection import OrdinaryCallingFormat, Location @@ -441,9 +444,5 @@ def main(): elif state == 'absent': destroy_bucket(connection, module, flavour=flavour) -from ansible.module_utils.basic import * -from ansible.module_utils.ec2 import * -import urlparse - if __name__ == '__main__': main()