Commit Graph

16 Commits

Author SHA1 Message Date
Erik Johnson
002aa88a97
Replace yaml usage with a helper to ensure unicode is handled properly
Without allow_unicode=True, unicode characters are processed through the
str representer and on Python 2 are dumped as a Unicode code point (i.e.
a literal \u0414). This commit makes allow_unicode=True the default in
our salt.utils.yamlloader.safe_dump() helper. It also adds a new
salt.utils.yamlloader.dump() helper which wraps yaml.dump() and also
makes allow_unicode=True the default.

To make importing and using our custom yaml loader/dumper easier, a
convenience module called salt.utils.yaml has been added, which does a
wildcard import from both salt.utils.yamldumper and
salt.utils.yamlloader.

Refs to yaml.load/dump and yaml.safe_load/safe_dump have been updated to
salt.utils.yaml, to ensure that unicode is handled properly.
2018-01-03 14:14:21 -06:00
Erik Johnson
683e2cc502
Rename 'environment' config option to 'saltenv'
'environment' predates the 'saltenv' nomenclature, and since we have
been using saltenv on the CLI for years, and now also have pillarenv, it
makes sense to make this change.
2017-11-30 13:08:49 -06:00
Pedro Algarvio
a75470a913 Py3 compatibility fixes 2015-01-30 22:25:08 +00:00
Pedro Algarvio
60f215f191 Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
rallytime
80b07f3578 Merge branch '2014.7' into '2015.2'
Conflicts:
	tests/buildpackage.py
2015-01-06 20:32:36 -07:00
Pedro Algarvio
a9eaf187e1 Ignore the file perms lint check 2015-01-07 01:15:56 +00:00
Nitin Madhok
c992f04f32 Changing permissions of test files and fixing lint violations 2014-12-19 05:50:18 -05:00
Seth House
429cc40376 Minor checks to the saltsh.py repl 2014-08-07 14:24:30 -04:00
Pedro Algarvio
05e5b19584 Fix PEP8 E713 - test for membership should be "not in" 2014-06-06 11:25:46 +01:00
Kyle Kelley
3d144e9e7a Use __opts__.get 2014-01-28 14:27:29 -07:00
Seth House
c2b563a56f Switched back the order of the she-bang and the Python coding decl.
This script (in its current form) is intended to be invoked as a shell
script so the she-bang must come first.
2013-12-11 16:04:09 -07:00
Thomas S Hatch
7ee36fce89 pylint fixes 2013-12-11 13:07:36 -07:00
Thomas S Hatch
64eb294c6e Fix some strange lint errors, @whitinge you may need to look here 2013-12-11 11:16:37 -07:00
Pedro Algarvio
2b6ae8428b Make PyLint even happier. 2013-12-11 10:43:51 +00:00
Pedro Algarvio
ca41ce936c Fix white-space related lint issues. 2013-12-11 09:05:36 +00:00
Seth House
69bac1d116 Initial stab at a development salt shell
There is quite a bit of additional work that could be done here but this
gets things rolling at least.

Refs #3814
2013-12-10 11:09:50 -07:00