fix an error message in invirt-getconf --ls
[invirt/packages/invirt-base.git] / files / usr / sbin / invirt-getconf
index 1976dbc..4721212 100755 (executable)
@@ -67,7 +67,8 @@ def main(argv):
         if opts.ls:
             if type(conf) not in (dict, list):
                 raise invirt_exception(
-                        '%s: node has no children (atomic datum)' % progress)
+                        '%s: node has no children (atomic datum)'
+                        % '.'.join(components))
             if type(conf) == list:
                 for i in xrange(len(conf)):
                     print i
@@ -79,7 +80,8 @@ def main(argv):
                 print conf
             else:
                 import yaml
-                yaml.safe_dump(conf, stdout, default_flow_style=False)
+                yaml.dump(conf, stdout,
+                          Dumper=yaml.CSafeDumper, default_flow_style=False)
     except invirt_exception, ex:
         print >> stderr, ex
         return 1