mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
Fix parsing of exception_hierarchy.txt when a platform-specific exception is
specified. Hopefully this wll bring warming to Tim's Windows-loving heart.
This commit is contained in:
parent
3b19754079
commit
6b4ed74791
1 changed files with 1 additions and 0 deletions
|
@ -42,6 +42,7 @@ class ExceptionClassTests(unittest.TestCase):
|
||||||
if '(' in exc_name:
|
if '(' in exc_name:
|
||||||
paren_index = exc_name.index('(')
|
paren_index = exc_name.index('(')
|
||||||
platform_name = exc_name[paren_index+1:-1]
|
platform_name = exc_name[paren_index+1:-1]
|
||||||
|
exc_name = exc_name[:paren_index-1] # Slice off space
|
||||||
if platform_system() != platform_name:
|
if platform_system() != platform_name:
|
||||||
exc_set.discard(exc_name)
|
exc_set.discard(exc_name)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue