[cvsspam-devel] RuntimeError => line did not begin with '#'

David Holroyd dave at badgers-in-foil.co.uk
Wed Nov 5 13:45:12 GMT 2008


On Thu, Oct 30, 2008 at 01:13:32PM -0400, Piergiuliano Bossi wrote:
> Hi all,
> 
> I've started using cvsspam in a new workplace some weeks ago (I'm a long
> time user, but not in the last 3 years). Everything was fine, except that
> yesterday there were 3 RuntimeError episodes. In all 3 instances I get
> something like this:
> 
> /usr/local/lib/cvsspam/cvsspam.rb:229:in `advance':
> /tmp/#cvsspam.27771.504-36629626/logfile:424 line did not begin with '#':
> if_line_of_code (RuntimeError)
>         from /usr/local/lib/cvsspam/cvsspam.rb:201:in `each'
>         from /usr/local/lib/cvsspam/cvsspam.rb:499:in `handleLines'
>         from /usr/local/lib/cvsspam/cvsspam.rb:1399
>         from /usr/local/lib/cvsspam/cvsspam.rb:1391:in `open'
>         from /usr/local/lib/cvsspam/cvsspam.rb:1391
>         from /usr/local/lib/cvsspam/cvsspam.rb:1387:in `open'
>         from /usr/local/lib/cvsspam/cvsspam.rb:1387
> /usr/local/lib/cvsspam/collect_diffs.rb:296:in `mailtest': problem running
> '/usr/local/lib/cvsspam/cvsspam.rb' (RuntimeError)
>         from /usr/local/lib/cvsspam/collect_diffs.rb:461
> 
> Where if_line_of_code is obviously an if statement (in java). Please note
> that the line numbers may be different than what you expect because I had to
> change the script in order to do authentication on an SMTP server and
> execute with nohup. Nevertheless, I don't think that my changes have caused
> this issue.
> 
> Consider that that if_line_of_code is present in 1 file only and that file
> hasn't been modified in months. It has nothing to do with the code change
> that was going to be notified. The other 2 instance point to other code.
> 
> Of course if I open the temp file I can clearly see that that line indeed
> doesn't start with '#'. At the same time, though, I don't see how
> collect_diffs.rb can have put something without a leading '#' into the temp
> file. Has anybody ever experienced something like this?
> 
> FYI:
> *) ruby 1.8.5 (2007-03-13 patchlevel 35) [i386-linux]
> *) cvsspam 0.2.12
> *) cvs 1.11.22 on a "Fedora Core release 5 (Bordeaux)" server

I don't remember ever having seen something like this.

Could it somehow be related to end-of-line-sequence handling (i.e.  are
extra windows-style carriage-return characters at the end of the line in
question)?

I seem to recall that the Ruby 'puts' method doesn't append a newline to
the string if there's one there already -- maybe windows line endings
cause this logic to foul up in one of the code paths?

Would be good to see the actual data, if possible?  (If you want to send
a private mail, I can treat it in confidence).


ta,
dave

-- 
http://david.holroyd.me.uk/



More information about the cvsspam-devel mailing list