diff --git a/listversioned/listversioned.rb b/listversioned/listversioned.rb index 2c3f4fb..09ff041 100755 --- a/listversioned/listversioned.rb +++ b/listversioned/listversioned.rb @@ -81,9 +81,10 @@ def fetch(uri_str, limit = 10) case response when Net::HTTPSuccess then response when Net::HTTPRedirection then fetch(response['location'], limit - 1) - when Net::HTTPNotFound then puts "404 Not Found #{uri_str}"; response.error! - when Net::HTTPUnauthorized then puts "401 Authorization Required #{uri_str}"; response.error! - when Net::HTTPUnauthorized then puts "401 Authorization Required #{uri_str}"; response.error! + when Net::HTTPUnauthorized then puts "401 Authorization Required #{uri_str}" + when Net::HTTPUnauthorized then puts "401 Authorization Required #{uri_str}" + when Net::HTTPForbidden then puts "403 Forbidden #{uri_str}" + when Net::HTTPNotFound then puts "404 Not Found #{uri_str}" else response.error! end @@ -156,7 +157,9 @@ def cvsparse(url) begin body = fetch("#{url}/CVS/Entries").body rescue - p $! + end + if body.nil? + return end dirs = Array.new body.each{|line| @@ -192,7 +195,6 @@ if mode.nil? body = fetch("#{options["-u"]}/.svn/entries").body mode="subversion" rescue - p $! end end @@ -202,7 +204,6 @@ if mode.nil? body = fetch("#{options["-u"]}/CVS/Entries").body mode="cvs" rescue - p $! end end