Mantis BugTracker for CapiSuite
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000131 [CapiSuite] core minor always 2006-04-19 23:04 2006-04-19 23:40
Reporter Victor Toni View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version
Summary 0000131: ValueError is not caught in "cs_helpers.py"
Description The file "/var/spool/capisuite/users/user_name/received/voice-nextnr" was empty in my case (maybe due to a write while the disk was full).
However the method "uniqueName" in "cs_helpers.py" does catch only an "IOError" (non existing file, wrong permissions, whatever) but in my case a "ValueError" is thrown because an empty string could not be converted to a number.
The implmentation should either check for both errors or for a more generic error type, which could occur to execute the code in the except block.
Additional Information Stacktrace for the failed operation:

Wed Apr 19 19:38:49 2006 Pythonscript /usr/lib/capisuite/incoming.py,callIncoming,0x81be210: A python error occured. See traceback below.
Wed Apr 19 19:38:49 2006 Pythonscript 0x81be210: Python traceback: Traceback (most recent call last):
Wed Apr 19 19:38:49 2006 Pythonscript 0x81be210: Traceback: File "/usr/lib/capisuite/incoming.py", line 74, in callIncoming
Wed Apr 19 19:38:49 2006 Pythonscript 0x81be210: Traceback: voiceIncoming(call,call_from,call_to,curr_user,config)
Wed Apr 19 19:38:49 2006 Pythonscript 0x81be210: Traceback: File "/usr/lib/capisuite/incoming.py", line 186, in voiceIncoming
Wed Apr 19 19:38:49 2006 Pythonscript 0x81be210: Traceback: filename=cs_helpers.uniqueName(udir+"received/","voice","la")
Wed Apr 19 19:38:49 2006 Pythonscript 0x81be210: Traceback: File "/usr/lib/python2.4/site-packages/cs_helpers.py", line 129, in uniqueName
Wed Apr 19 19:38:49 2006 Pythonscript 0x81be210: Traceback: nextnr=int(countfile.readline())
Wed Apr 19 19:38:49 2006 Pythonscript 0x81be210: Traceback: ValueError: invalid literal for int():
Attached Files

- Relationships

- Notes
(0000242)
Victor Toni
2006-04-19 23:40

Maybe line 131 in "cs_helpers.py" should be patched from:
        except IOError:
to:
        except (IOError, ValueError):
 

- Issue History
Date Modified Username Field Change
2006-04-19 23:04 Victor Toni New Issue
2006-04-19 23:40 Victor Toni Note Added: 0000242


Mantis 0.19.2
Copyright © 2000 - 2004 Mantis Group
125 total queries executed.
19 unique queries executed.