Issue 1540849: except too broad (original) (raw)

Issue1540849

Created on 2006-08-15 18:55 by jimjjewett, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
idlelibiobinding.patch.txt jimjjewett,2006-08-15 18:55 Narrows to appripriate exception
Messages (2)
msg50891 - (view) Author: Jim Jewett (jimjjewett) Date: 2006-08-15 18:55
IOBinding.open looks for an self.editwin.interp (after having already verified that self.editwin exists), but catches exceptions with a bare except. This narrows it to an AttributeError. (Note that the save method already assumes that missing attributes on an editwin will be represented as AtributeError rather than TypeError.)
msg50892 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2007-02-06 19:23
Rev 53650. This wasn't really worth a patch. What other exception could have occurred? (Yes, it's nicer to be narrow :)
History
Date User Action Args
2022-04-11 14:56:19 admin set github: 43826
2006-08-15 18:55:39 jimjjewett create