#123 SerialException not returned

closed-fixed
None
5
2012-08-16
2012-07-04
B Shaw
No

On line 88 in serialutil.py portNotOpenError is does not appear to be a SerialException or a SerialTimeoutException, suggest change to:
portNotOpenError = SerialException('Attempting to use a port that is not open')

This allows the exception to be caught without having to use the catchall Exception. I apologize if I am mistaken (or this was the intended behavior)

Discussion

  • Chris Liechti

    Chris Liechti - 2012-08-16

    right, it was throwing a ValueError, however that type of error is expected for wrong parameters and less so for the object being in the wrong state. changed to use a SerialException.

     
  • Chris Liechti

    Chris Liechti - 2012-08-16
    • assigned_to: nobody --> cliechti
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks