MCPcopy
hub / github.com/saltstack/salt / session_run_always

Function session_run_always

noxfile.py:113–130  ·  view source on GitHub ↗

Patch nox to allow running some commands which would be skipped if --install-only is passed.

(session, *command, **kwargs)

Source from the content-addressed store, hash-verified

111
112
113def session_run_always(session, *command, **kwargs):
114 """
115 Patch nox to allow running some commands which would be skipped if --install-only is passed.
116 """
117 try:
118 # Guess we weren't the only ones wanting this
119 # https://github.com/theacodes/nox/pull/331
120 return session.run_always(*command, **kwargs)
121 except AttributeError:
122 old_install_only_value = session._runner.global_config.install_only
123 try:
124 # Force install only to be false for the following chunk of code
125 # For additional information as to why see:
126 # https://github.com/theacodes/nox/pull/181
127 session._runner.global_config.install_only = False
128 return session.run(*command, **kwargs)
129 finally:
130 session._runner.global_config.install_only = old_install_only_value
131
132
133def find_session_runner(session, name, python_version, onedir=False, **kwargs):

Callers 8

_install_requirementsFunction · 0.85
test_parametrizedFunction · 0.85
decompress_dependenciesFunction · 0.85
compress_dependenciesFunction · 0.85
pre_archive_cleanupFunction · 0.85
ci_test_onedir_pkgsFunction · 0.85

Calls 1

runMethod · 0.45

Tested by 1

test_parametrizedFunction · 0.68