From ab9b2e8eed9cacddf9f89019ea7bcd936ae759f9 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Tue, 13 Sep 2016 15:01:52 +0200 Subject: [PATCH] F #4716: Cast the timeout to integer --- src/authm_mad/one_auth_mad.rb | 2 +- src/datastore_mad/one_datastore.rb | 2 +- src/im_mad/im_exec/one_im_exec.rb | 2 +- src/ipamm_mad/one_ipam.rb | 4 ++-- src/market_mad/one_market.rb | 2 +- src/vmm_mad/exec/one_vmm_exec.rb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/authm_mad/one_auth_mad.rb b/src/authm_mad/one_auth_mad.rb index d582cf8b48..ef12d905dd 100755 --- a/src/authm_mad/one_auth_mad.rb +++ b/src/authm_mad/one_auth_mad.rb @@ -196,7 +196,7 @@ begin when '--authn' authn = arg.split(',').map {|a| a.strip } when '--timeout' - timeout = arg + timeout = arg.to_i end end rescue Exception => e diff --git a/src/datastore_mad/one_datastore.rb b/src/datastore_mad/one_datastore.rb index 8e8aab8425..42bc383729 100755 --- a/src/datastore_mad/one_datastore.rb +++ b/src/datastore_mad/one_datastore.rb @@ -256,7 +256,7 @@ begin when '--system-ds-types' sys_ds_type = arg.split(',').map {|a| a.strip } when '--timeout' - timeout = arg + timeout = arg.to_i end end rescue Exception => e diff --git a/src/im_mad/im_exec/one_im_exec.rb b/src/im_mad/im_exec/one_im_exec.rb index 6f36ed3adf..881192feec 100755 --- a/src/im_mad/im_exec/one_im_exec.rb +++ b/src/im_mad/im_exec/one_im_exec.rb @@ -132,7 +132,7 @@ begin when '--force-copy' force_copy=true when '--timeout' - timeout = arg + timeout = arg.to_i end end rescue Exception => e diff --git a/src/ipamm_mad/one_ipam.rb b/src/ipamm_mad/one_ipam.rb index e9106acb1f..90834dc347 100755 --- a/src/ipamm_mad/one_ipam.rb +++ b/src/ipamm_mad/one_ipam.rb @@ -151,7 +151,7 @@ opts = GetoptLong.new( i_types = nil threads = 1 -timeout = 1 +timeout = nil begin opts.each do |opt, arg| @@ -161,7 +161,7 @@ begin when '--threads' threads = arg.to_i when '--timeout' - timeout = arg + timeout = arg.to_i end end rescue Exception => e diff --git a/src/market_mad/one_market.rb b/src/market_mad/one_market.rb index aaf71635ee..2e5f7db8a1 100755 --- a/src/market_mad/one_market.rb +++ b/src/market_mad/one_market.rb @@ -298,7 +298,7 @@ begin when '--market-types' mp_type = arg.split(',').map {|a| a.strip } when '--timeout' - timeout = arg + timeout = arg.to_i end end rescue Exception => e diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb index 72057c4428..9e84bcfca8 100755 --- a/src/vmm_mad/exec/one_vmm_exec.rb +++ b/src/vmm_mad/exec/one_vmm_exec.rb @@ -1089,7 +1089,7 @@ begin when '--parallel' single_host = false when '--timeout' - timeout = arg + timeout = arg.to_i end end rescue Exception => e