Skip to content

Commit 7b71977

Browse files
author
David Noble
committed
Added option message argument to SearchCommand.error_exit
Sometimes the message to the splunkweb user should be different than the message that's written to the log file.
1 parent fcc6ea3 commit 7b71977

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

splunklib/searchcommands/search_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ def service(self):
274274

275275
#region Methods
276276

277-
def error_exit(self, error):
277+
def error_exit(self, error, message=None):
278278
self.logger.error('Abnormal exit: %s', error)
279-
self.write_error(error)
279+
self.write_error(error.message.capitalize() if message is None else message)
280280
exit(1)
281281

282282
def process(self, args=argv, input_file=stdin, output_file=stdout):

0 commit comments

Comments
 (0)