When a version is specified, a given package's entry in the all_pkgs
list contains the version number (e.g. "name=version" instead of just
"name"). This fixes the check for which packages to unhold by creating a
separate list of targeted package names by stripping off the "=" (if
present) from each element in all_pkgs.
1. The iteritems func from six was being imported directly into the
module, which means that the loader picks it up and we end up with a
pip.iteritems in the __salt__ dunder.
2. When env_vars is passed, it permanently modifies os.environ, when it
should just be passing the values in the env argument to cmd.run_all.
This fixes both of these issues.
With a sqlite3 database containing a table with this schema:
CREATE TABLE `user` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
, `login` TEXT NOT NULL)
using `sqlite3.table_present` with this definition:
user:
sqlite3.table_present:
- db: /tmp/sqlite.db
- schema: |
CREATE TABLE `user` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
, `login` TEXT NOT NULL)
returns an error indicating that the schemas do not match. That's
because the `schema` variable in the YAML ends with a newline, while the
schema returned by python-sqlite3 doesn't.
This commit strips leading and trailing whitespace from the YAML schema.
TCP transport's `TCPClientKeepAlive` derives from
`tornado.tcpclient.TCPClient` and overrides `_create_stream`.
Tornado 4.5 added the kwargs `source_ip` and `source_port` to
`_create_stream`. This new functionality is not needed by Salt.
To be backwards and forwards compatible, add `**kwargs` to swallow
these and any future kwargs that are added.
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
We don't need __master_connected events in failover mode as in this mode
__master_disconnected handler does the job and the connected event could
break the sequence.
The error of missing charmaps gets logged to the user. We shouldn't
be running the test for the gen_locale if we don't have charmaps
available on the test machine.
This further abstracts some of the setup and teardown code so it can be
used for git-over-http tests.
It also moves the code that was originally added to the archive
state integration tests to create a local http server into
salt.support.helpers so that it can be more easily and portably used.