Prior to 2018.3 we were normalizing the format string to unicode but not
the args. This means that even when a non-unicode format string was
used, a str argument containing utf8-encoded non-ascii chars would result
in a traceback.
This backports the arg normalization from 2018.3 to to 2017.7 to ensure
that these sort of cases do not cause errors in logging.
It would be really nice to have a better name for `cmd_cli` in a future
release, possibly cmd_gen. I don't feel comfortable making this change in
2017.7 though
extending on the idea used in #32145, when _check_pub_data is called it it will
create jid subscriptions, regardless of whether anyone will ever come back to
retrieve them; in the case of local_async calls noone ever does.
In addition to the above, we use the listen kwarg provided by c59a5adb0d to
know whether we need to subscribe to events in addition to ensuring the ioloop
is listening before a call is made.
This should fix#40245, #20639, #36374
Older versions of npm can't validate the newer certificate.
We don't really need to worry about this, and it would be better to just make
sure the tests run correctly that to use https for the tests.
If the `sense_hat` python library is installed on the Raspberry Pi, but the
Pi doesn't actually have a SenseHat available, the execution module will
stacktrace when it's loaded:
```
root@raspberrypi:/home/pi# salt-call --local sys.doc none
[ERROR ] Failed to import module sensehat, this is due most likely to a syntax error:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1411, in _load_module
mod = imp.load_module(mod_namespace, fn_, fpath, desc)
File "/usr/lib/python2.7/dist-packages/salt/modules/sensehat.py", line 26, in <module>
_sensehat = SenseHat()
File "/usr/lib/python2.7/dist-packages/sense_hat/sense_hat.py", line 36, in __init__
raise OSError('Cannot detect %s device' % self.SENSE_HAT_FB_NAME)
OSError: Cannot detect RPi-Sense FB device
local:
----------
```
We need to catch the OSError and warn people that this module needs a SenseHat
available to the Pi to work.
This PR catches that OSError in the `__virtual__()` and displays a helpful message to
the user.
This change also helps distinguish the errors of when the `sense_hat` python lib is
missing vs the actual SenseHat missing.
The changes in #46778 introduced a couple of test failures into the 2017.7 branch.
This PR cleans up some of the references causing failures on 3 new test failures.
The failures are due to the new reference of the `mantest` module, which is only
used for testing here, and not an actual module in salt to test docs and the
saltutil module against.