{{{#!python
try:
result = compare_xml(xml1, xml2)
except Exception as e:
standardMsg = 'First or second argument is not valid XML\n%s' % e
self.fail(self._formatMessage(msg, standardMsg))
}}}
Because of that, KeyboardInterrupt and SystemExit raised during XML
comparison are suppressed.
--
Ticket URL: <https://code.djangoproject.com/ticket/21509>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0
Comment:
I’ve created a pull request: https://github.com/django/django/pull/1992
--
Ticket URL: <https://code.djangoproject.com/ticket/21509#comment:1>
* status: new => closed
* resolution: => invalid
Comment:
Hi,
`KeyboardInterrupt` and `SystemExit` are not caught by an `except
Exception` clause (that's because they inherit from `BaseException`):
{{{#!python
>>> issubclass(SystemExit, Exception)
False
>>> issubclassKeyboardInterrupt, Exception)
False
}}}
The code change you proposed would have no effect.
--
Ticket URL: <https://code.djangoproject.com/ticket/21509#comment:2>
* status: closed => new
* resolution: invalid =>
Comment:
Indeed, I was misleaded, by this legacy code:
https://github.com/django/django/blob/3c10d1e64faeb67b41e7aa501b21252e357a4564/django/test/testcases.py#L178
. Since we don’t support Python 2.4 and lower anymore, such parts of code
can be removed, so I’m reopening the ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/21509#comment:3>
* has_patch: 1 => 0
* stage: Unreviewed => Accepted
* component: Testing framework => Uncategorized
Comment:
Indeed, that is not necessary anymore. Good catch.
A cleanup of the whole codebase to remove this outdated pattern would be
nice.
I'm accepting the ticket on this basis (and changing the description
accordingly).
--
Ticket URL: <https://code.djangoproject.com/ticket/21509#comment:4>
* has_patch: 0 => 1
Comment:
Ok, I’ve opened another pull request:
https://github.com/django/django/pull/1993 . I’ve grepped the whole
codebase, but found this pattern only in one file.
--
Ticket URL: <https://code.djangoproject.com/ticket/21509#comment:5>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"7a0a3a64a827480c737060bcd5af9af25c3b3c15"]:
{{{
#!CommitTicketReference repository=""
revision="7a0a3a64a827480c737060bcd5af9af25c3b3c15"
Fixed #21509 -- Removed dead exception catching code.
Since Python 2.5, KeyboardInterrupt and SystemExit are not subclasses of
Exception, so explicitly reraising them before the “except Exception”
clause
is not necessary anymore.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21509#comment:6>
* version: master => 1.5
Comment:
<a href=http://www.andresramirezgaviria.com/file/#o0c0>provigil 200</a>
provigil 100mg side effects - provigil generic release date
--
Ticket URL: <https://code.djangoproject.com/ticket/21509#comment:7>
* version: master => 1.5-rc-1
Comment:
<a href=http://www.andresramirezgaviria.com/file/#o0c0>Learn More</a> buy
provigil - provigil medication
--
Ticket URL: <https://code.djangoproject.com/ticket/21509#comment:7>