Skip to content

Commit 10d3ad3

Browse files
committed
Prevent error when workers config not found, throw warning instead
Related: https://progress.opensuse.org/issues/181409
1 parent 2d67834 commit 10d3ad3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/OpenQA/Worker/Settings.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use Mojo::Util 'trim';
1010
use Config::IniFiles;
1111
use Time::Seconds;
1212
use OpenQA::Config;
13-
use OpenQA::Log 'setup_log';
13+
use OpenQA::Log qw(setup_log log_info);
1414
use OpenQA::Utils 'is_host_local';
1515
use Net::Domain 'hostfqdn';
1616

@@ -23,7 +23,8 @@ use constant VNCPORT_OFFSET => $ENV{VNCPORT_OFFSET} // 90;
2323
sub new ($class, $instance_number = undef, $cli_options = {}) {
2424
my $config_paths = lookup_config_files(undef, 'workers.ini', 1);
2525
my $cfg = parse_config_files($config_paths);
26-
my @parse_errors = @$config_paths ? (@Config::IniFiles::errors) : ('No config file found.');
26+
my @parse_errors = @$config_paths ? (@Config::IniFiles::errors) : ();
27+
log_info 'workers.ini not found, using default settings' unless @$config_paths;
2728

2829
# read settings from config
2930
my %global_settings;

0 commit comments

Comments
 (0)