Skip to content

Commit

Permalink
Simplify 404 checking
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Apr 18, 2011
1 parent f86183d commit b15d7a4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/mechanize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -939,12 +939,8 @@ def response_authenticate(response, page, uri, request, headers, params,
def webrobots_http_get(uri)
get_file(uri)
rescue Mechanize::ResponseCodeError => e
case e.response_code
when '404'
''
else
raise e
end
return '' if e.response_code == '404'
raise e
end

def webrobots
Expand Down

0 comments on commit b15d7a4

Please sign in to comment.