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)
| 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 | |
| 294 | class MergeConfigMixIn(metaclass=MixInMeta): |