Skip to content

Commit

Permalink
SIRE-9608 fix rubocop tests
Browse files Browse the repository at this point in the history
Reviewed-by: muspelkat
  • Loading branch information
Bernd Eilers committed Jul 3, 2023
1 parent 823a0a3 commit 0d9b992
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/provider/mongodb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def self.mongo_eval(cmd, db = 'admin', retries = 10, host = nil)
retry_count -= 1
if retry_count.positive?
Puppet.debug "Request failed: '#{e.message}' Retry: '#{retries - retry_count}'"
out = { 'errmsg' => "#{e.message}" }
out = { 'errmsg' => e.message }
sleep retry_sleep
retry
end
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/mongodb_database/mongodb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def self.instances
require 'json'

mongo_eval_result = mongo_eval("JSON.stringify(db.getMongo().getDBs())")
mongo_eval_result = mongo_eval('JSON.stringify(db.getMongo().getDBs())')

dbs = JSON.parse mongo_eval_result

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/mongodb_replset/mongo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def self.mongo_command(command, host = nil, retries = 4)
# Parse the JSON output and return
begin
JSON.parse(output)
rescue
rescue e
output
end
end
Expand Down

0 comments on commit 0d9b992

Please sign in to comment.