Roundup Tracker - Issues

Issue 614188

classification
Exception in mailgw.py
Type: Severity: normal
Components: Mail interface Versions:
process
Status: closed fixed
:
: richard : richard
Priority: normal :

Created on 2002-09-25 04:45 by anonymous, last changed 2002-09-25 04:45 by anonymous.

Messages
msg371 Author: [hidden] (anonymous) Date: 2002-09-25 04:45
I'm running roundup-0.4.4. Someone submitted a bug via 
email, and got the exception

Traceback (most recent call last):
  File "C:\Python22\Lib\site-
packages\roundup\mailgw.py", line 150, in 
handle_Message
    return self.handle_message(message)
  File "C:\Python22\Lib\site-
packages\roundup\mailgw.py", line 655, in 
handle_message
    keep_body)
  File "C:\Python22\Lib\site-
packages\roundup\mailgw.py", line 742, in parseContent
    if line[0] not in '>|':
IndexError: string index out of range

The respective lines read

for line in lines[1:]:
    if line[0] not in '>|':
        break

this raises an exception if line is an empty string. As far 
as I can see, it shouldn't check empty lines, so here is 
my proposed fix:
    
for line in lines[1:]:
    if line and line[0] not in '>|':
        break
    
    

    
msg372 Author: [hidden] (richard) Date: 2002-09-25 05:13
Logged In: YES 
user_id=6405

Fixed in CVS, thanks. 
 
History
Date User Action Args
2002-09-25 04:45:22anonymouscreate