From mboxrd@z Thu Jan 1 00:00:00 1970 From: jeff.covey@pobox.com (jeff covey) Date: Sun, 3 Jun 2007 21:11:34 -0400 Subject: [sup-talk] gracefully handling missing sources In-Reply-To: <1180898390-sup-7346@south> References: <20070527195013.GB4859@mona.jeffcovey.net> <1180325255-sup-6791@south> <20070603181402.GA8650@mona.jeffcovey.net> <1180898390-sup-7346@south> Message-ID: <20070604011134.GA12184@mona.jeffcovey.net> on Sun, Jun 03, 2007 at 12:20:47PM -0700%, William Morgan said: > I have a patch for it. Going to do a little more testing and then I'll > commit, probably later today. thanks! i updated with svn and am trying it out. i've run into this problem when sup tries to load a source which no longer exists: ./lib/sup/buffer.rb:45: warning: already initialized constant KEY_CANCEL ./lib/sup/mbox/loader.rb:20:in `initialize': No such file or directory - /home/jeff/mail/dogabulten at dogadernegi.org-2007-06 (Errno::ENOENT) from ./lib/sup/mbox/loader.rb:20:in `open' from ./lib/sup/mbox/loader.rb:20:in `initialize' from ./lib/sup.rb:28:in `new' from ./lib/sup.rb:28:in `yaml_properties' from /usr/lib/ruby/1.8/yaml.rb:133:in `call' from /usr/lib/ruby/1.8/yaml.rb:133:in `transfer' from /usr/lib/ruby/1.8/yaml.rb:133:in `node_import' from /usr/lib/ruby/1.8/yaml.rb:133:in `load' from /usr/lib/ruby/1.8/yaml.rb:133:in `load' from /usr/lib/ruby/1.8/yaml.rb:144:in `load_file' from /usr/lib/ruby/1.8/yaml.rb:143:in `open' from /usr/lib/ruby/1.8/yaml.rb:143:in `load_file' from ./lib/sup.rb:84:in `load_yaml_obj' from ./lib/sup/index.rb:278:in `load_sources' from ./lib/sup/index.rb:29:in `load' from bin/sup:58 i have a cron job which deletes zero-length files under ~/mail so they don't clutter. could sup handle no-longer-existent sources gracefully, either ignoring them or (perhaps better) offering to remove them from sources.yaml? thanks, -- jeff covey http://jeffcovey.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 229 bytes Desc: Digital signature Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070603/2ca68556/attachment.bin