lib/wmap/domain_tracker.rb in wmap-2.4.9 vs lib/wmap/domain_tracker.rb in wmap-2.5.0
- old
+ new
@@ -106,12 +106,12 @@
end
alias_method :size, :count
# 'setter' to add domain entry to the cache one at a time
def add(host)
- puts "Add entry to the local domains cache table: #{host}" if @verbose
- #begin
+ begin
+ puts "Add entry to the local domains cache table: #{host}" if @verbose
return nil if host.nil? or host.empty?
host=host.strip.downcase
if @known_internet_domains.key?(host)
puts "Domain is already exist. Skipping: #{host}"
else
@@ -144,12 +144,12 @@
return record
else
puts "Problem add domain #{host} - please use legal root domain or sub domain only."
end
end
- #rescue => ee
- #puts "Exception on method #{__method__}: #{ee}" if @verbose
- #end
+ rescue => ee
+ puts "Exception on method #{__method__}: #{ee}" if @verbose
+ end
end
# 'setter' to add domain entry to the cache in batch (from a file)
def file_add(file)
begin