~stanislav-turlo/cloud-init/softlayer-support

Viewing all changes in revision 1039.

  • Committer: Joshua Harlow
  • Date: 2014-11-22 02:10:16 UTC
  • mfrom: (1025.4.1 cloud-init)
  • Revision ID: harlowja@yahoo-inc.com-20141122021016-prnykyg70782zz94
Pretty up the debug module

Previously the usage of the yaml_dumps module was causing
any python unicode key and value to show up as:

'item': !!python/unicode "some string"

This was not very pretty...

Fix this by using safe_dumps (which is also a good thing to
use and allow_unicode=True). Also create a tiny helper function
in the cc_debug module that does not include the yaml start and
end footers (since this module has its own footers and headers).

Also includes a basic sanity test for this module.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: