From e16cda21e69500bc24cda9c934a2f0e12446f69e Mon Sep 17 00:00:00 2001 From: Chad Lajiness Date: Mon, 2 Dec 2024 08:30:45 -0600 Subject: [PATCH] fixed logic bug in qbit if statement --- qbop.rb | 7 ++++--- version.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qbop.rb b/qbop.rb index ccb0be0..00c1fc4 100644 --- a/qbop.rb +++ b/qbop.rb @@ -147,7 +147,10 @@ def parse_config end # qBit section - unless config["qbit_skip"].nil? || config["qbit_skip"].to_s.downcase == "true" + if config["qbit_skip"]&.to_s&.downcase == "true" + # ignore qBit section + @logger.info("qBit check skipped") + else begin # create qBit object qbit ||= Service::Qbit.new @@ -200,8 +203,6 @@ def parse_config sleep config["loop_freq"].to_i next end - else - @logger.info("qBit check skipped") end # sleep before looping again diff --git a/version.yml b/version.yml index 0a8de35..f0d9298 100644 --- a/version.yml +++ b/version.yml @@ -1,2 +1,2 @@ --- -version: 0.5.1 +version: 0.5.2