From 9e476599cb48ba830e55d5f5fcd1a13eb137ce14 Mon Sep 17 00:00:00 2001 From: William Morgan Date: Mon, 28 Jan 2008 12:15:38 -0800 Subject: [PATCH] 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! --- lib/sup/person.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.45.2