Skip to content

Commit

Permalink
Merge pull request #6 from clajiness/v0.5
Browse files Browse the repository at this point in the history
fixed logic bug in qbit if statement
  • Loading branch information
clajiness authored Dec 2, 2024
2 parents 2d3e018 + e16cda2 commit b79350e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions qbop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion version.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
version: 0.5.1
version: 0.5.2

0 comments on commit b79350e

Please sign in to comment.