Update shebang to Python 3
[invirt/packages/invirt-base.git] / scripts / invirt-getconf
index 86b36b7..2d5bff2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 """
 invirt-getconf loads an invirt configuration file (either the original YAML
@@ -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:
@@ -82,5 +84,3 @@ def main(argv):
 
 if __name__ == '__main__':
     exit(main(argv))
-
-# vim:et:sw=4:ts=4