[Patches] [ python-Patches-1540849 ] except too broad
SourceForge.net
noreply at sourceforge.net
Tue Feb 6 20:23:02 CET 2007
Patches item #1540849, was opened at 2006-08-15 14:55
Message generated for change (Comment added) made by kbk
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1540849&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: Python 2.6
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Kurt B. Kaiser (kbk)
Summary: except too broad
Initial Comment:
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.)
----------------------------------------------------------------------
>Comment By: Kurt B. Kaiser (kbk)
Date: 2007-02-06 14:23
Message:
Logged In: YES
user_id=149084
Originator: NO
Rev 53650.
This wasn't really worth a patch. What other exception could have
occurred? (Yes, it's nicer to be narrow :)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1540849&group_id=5470
More information about the Patches
mailing list