Skip to content

Commit

Permalink
console runscripts: suppress output about autoselection
Browse files Browse the repository at this point in the history
When a console command runs something on the database,
two Job Messages with JobId 0 are created:

JobId 1: console command: run AfterJob "update jobid=1 jobtype=A"
JobId 0: Automatically selected Catalog: MyCatalog
JobId 0: Using Catalog "MyCatalog"

This commit suppresses these messages.
  • Loading branch information
pstorz committed Feb 21, 2018
1 parent d4c4aca commit de78414
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dird/ua_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ bool open_db(UAContext *ua, bool use_private)
ua->shared_db = ua->db;
}

if (!ua->api) {
if (!ua->api && !ua->runscript) {
ua->send_msg(_("Using Catalog \"%s\"\n"), ua->catalog->name());
}

Expand Down
2 changes: 1 addition & 1 deletion src/dird/ua_select.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt,
if (prompt) {
bstrncpy(prompt, ua->prompt[1], max_prompt);
}
if (!ua->api) {
if (!ua->api && !ua->runscript) {
ua->send_msg(_("Automatically selected %s: %s\n"), automsg, ua->prompt[1]);
}
goto done;
Expand Down

0 comments on commit de78414

Please sign in to comment.