mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
M #-: fix minor bug (#4631)
This commit is contained in:
parent
de1f9a217a
commit
776c4a2d66
@ -27,7 +27,7 @@ class OneDB
|
||||
def initialize(ops)
|
||||
if ops[:backend].nil? && CONNECTION_PARAMETERS.all? {|s| ops[s].nil? }
|
||||
ops = read_credentials(ops)
|
||||
elsif ops[:backend].nil? && CONNECTION_PARAMETERS.one? {|s| !ops[s].nil? }
|
||||
elsif ops[:backend].nil? && CONNECTION_PARAMETERS.any? {|s| !ops[s].nil? }
|
||||
# Set MySQL backend as default if any connection option is provided and --type is not
|
||||
ops[:backend] = :mysql
|
||||
end
|
||||
@ -141,7 +141,7 @@ class OneDB
|
||||
|
||||
ops.each {|_, v| v.gsub!("\\", '') if v }
|
||||
|
||||
ops[:backend] = ops[:backend].to_sym
|
||||
ops[:backend] = ops[:backend].to_sym unless ops[:backend].nil?
|
||||
ops[:port] = ops[:port].to_i
|
||||
|
||||
ops
|
||||
|
Loading…
x
Reference in New Issue
Block a user