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

Method error

salt/utils/parsers.py:280–291  ·  view source on GitHub ↗

error(msg : string) Print a usage message incorporating 'msg' to stderr and exit. This keeps option parsing exit status uniform for all parsing errors.

(self, msg)

Source from the content-addressed store, hash-verified

278 optparse.OptionParser.exit(self, status, msg)
279
280 def error(self, msg):
281 """
282 error(msg : string)
283
284 Print a usage message incorporating 'msg' to stderr and exit.
285 This keeps option parsing exit status uniform for all parsing errors.
286 """
287 self.print_usage(sys.stderr)
288 self.exit(
289 salt.defaults.exitcodes.EX_USAGE,
290 f"{self.get_prog_name()}: error: {msg}\n",
291 )
292
293
294class MergeConfigMixIn(metaclass=MixInMeta):

Callers 15

parse_argsMethod · 0.95
find_session_runnerFunction · 0.45
_get_pydirFunction · 0.45
_run_with_coverageFunction · 0.45
_report_coverageFunction · 0.45
test_cloudFunction · 0.45
ci_testFunction · 0.45
ci_test_onedirFunction · 0.45
ci_test_onedir_tcpFunction · 0.45
decompress_dependenciesFunction · 0.45
compress_dependenciesFunction · 0.45

Calls 1

exitMethod · 0.95

Tested by 2

test_cloudFunction · 0.36
raise_exceptionFunction · 0.36