Ticket #5714 task new

Opened 11 months ago

Last modified 11 months ago

Use Exception.args instead of iterating over it

Reported by: vperic Owned by: vperic
Priority: normal Milestone: Python-3.x
Component: core Keywords: py3k
Cc: Branch: branches/except-args-5714
Author: vperic Launchpad Bug:

Description

In Python 3, it is no longer possible to iterate over an exception, because the getitem method is no longer supported. The solution is to use args to access what we need.

Change History

1

Changed 11 months ago by vperic

  • branch set to branches/except-args-5714
  • branch_author set to vperic

(In [34596]) Create branch except-args-5714

2

Changed 11 months ago by vperic

  • keywords review added
  • owner vperic deleted

This should be trivial enough, there were just 4 cases.  Build results.

3

Changed 11 months ago by exarkun

  • owner set to vperic
  • keywords review removed

The errno attribute of these exception types is a better replacement than args[0].

Note: See TracTickets for help on using tickets.