[Libguestfs] [PATCH 32/61] p2v: main - dont quit on empty error

Maros Zatko mzatko at redhat.com
Wed Feb 12 14:30:44 UTC 2014


---
 p2v/client/lib/virt-p2v/ui/main.rb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/p2v/client/lib/virt-p2v/ui/main.rb b/p2v/client/lib/virt-p2v/ui/main.rb
index b91225c..2d36028 100644
--- a/p2v/client/lib/virt-p2v/ui/main.rb
+++ b/p2v/client/lib/virt-p2v/ui/main.rb
@@ -265,15 +265,15 @@ class NewMain < Main
     elsif name == 'connect_error'
       n = NeverMind.new self, name
       n.eigen.send(:define_method, :text) do
-        p "called text on #{@name}"
         @text || ""
       end
       n.eigen.send(:define_method, :"text=") do |str|
         @text = str
-#        p "called text= '#{str}' on #{@name}"
-        puts "Error connecting: '#{str}'"
-        puts "Giving up."
-        exit(3)
+        unless str == ''
+          puts "Error connecting: '#{str}'"
+          puts "Giving up."
+          exit(3)
+        end
       end
       n
     elsif ["server_hostname", "server_username", "server_password",
-- 
1.8.3.1




More information about the Libguestfs mailing list