Skip to content

Commit

Permalink
Fix pypa#7280 - make test code more DRY
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Davis committed Jan 2, 2020
1 parent 0fb324b commit 8770497
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/lib/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ def external_file_opener(conn):
lock_action(f)
elif action == 'noread':
make_unreadable_file(path)
# IOError is OSError post PEP 3151
except OSError:
traceback.print_exc(None, sys.stderr)
except IOError:
except (OSError, IOError):
# IOError is OSError post PEP 3151
traceback.print_exc(None, sys.stderr)

# Indicate the file is opened
Expand Down

0 comments on commit 8770497

Please sign in to comment.