Move all imports to top of file and organize
[invirt/packages/invirt-base.git] / scripts / invirt-getconf
index d07b215..e5563a4 100755 (executable)
@@ -16,9 +16,12 @@ Examples:
   invirt-getconf hosts.0.ip
 """
 
-from invirt import config
 from sys import argv, exit, stderr, stdout
 from optparse import OptionParser
+import yaml
+
+from invirt import config
+
 
 class invirt_exception(Exception): pass
 
@@ -73,7 +76,6 @@ def main(argv):
             if type(conf) not in (dict, list):
                 print conf
             else:
-                import yaml
                 yaml.dump(conf, stdout,
                           Dumper=yaml.CSafeDumper, default_flow_style=False)
     except invirt_exception, ex: