projects
/
invirt/packages/invirt-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update shebang to Python 3
[invirt/packages/invirt-base.git]
/
scripts
/
invirt-getconf
diff --git
a/scripts/invirt-getconf
b/scripts/invirt-getconf
index
d07b215
..
2d5bff2
100755
(executable)
--- a/
scripts/invirt-getconf
+++ b/
scripts/invirt-getconf
@@
-1,4
+1,4
@@
-#!/usr/bin/env python
+#!/usr/bin/python3
"""
invirt-getconf loads an invirt configuration file (either the original YAML
"""
invirt-getconf loads an invirt configuration file (either the original YAML
@@
-16,9
+16,12
@@
Examples:
invirt-getconf hosts.0.ip
"""
invirt-getconf hosts.0.ip
"""
-from invirt import config
from sys import argv, exit, stderr, stdout
from optparse import OptionParser
from sys import argv, exit, stderr, stdout
from optparse import OptionParser
+import yaml
+
+from invirt import config
+
class invirt_exception(Exception): pass
class invirt_exception(Exception): pass
@@
-73,7
+76,6
@@
def main(argv):
if type(conf) not in (dict, list):
print conf
else:
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:
yaml.dump(conf, stdout,
Dumper=yaml.CSafeDumper, default_flow_style=False)
except invirt_exception, ex: