From: William Morgan Date: Mon, 28 Jan 2008 20:15:38 +0000 (-0800) Subject: don't crash when people.txt is corrupted X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=9e476599cb48ba830e55d5f5fcd1a13eb137ce14;p=sup don't crash when people.txt is corrupted This was a debug check, but if Sup crashes when writing out people.txt, this will prevent it from ever starting again! --- diff --git a/lib/sup/person.rb b/lib/sup/person.rb index 5bd15a8..1c721e4 100644 --- a/lib/sup/person.rb +++ b/lib/sup/person.rb @@ -9,7 +9,7 @@ class PersonManager ## read in stored people IO.readlines(fn).map do |l| - l =~ /^(.*)?:\s+(\d+)\s+(.*)$/ or raise "can't parse: #{l}" + l =~ /^(.*)?:\s+(\d+)\s+(.*)$/ or next email, time, name = $1, $2, $3 @@people[email] = Person.new name, email, time, false end if File.exists? fn