mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Replace boolean test with is None.
This commit is contained in:
parent
1931ca72b5
commit
f13eb55d59
6 changed files with 10 additions and 10 deletions
|
@ -122,7 +122,7 @@ def rmtree(path, ignore_errors=0, onerror=None):
|
|||
exc = sys.exc_info()
|
||||
if ignore_errors:
|
||||
pass
|
||||
elif onerror:
|
||||
elif onerror is not None:
|
||||
onerror(cmd[0], cmd[1], exc)
|
||||
else:
|
||||
raise exc[0], (exc[1][0], exc[1][1] + ' removing '+cmd[1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue