mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #16706: get rid of os.error
This commit is contained in:
parent
a191959849
commit
ad28c7f9da
33 changed files with 4089 additions and 4123 deletions
|
@ -732,7 +732,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
|
|||
"""
|
||||
try:
|
||||
list = os.listdir(path)
|
||||
except os.error:
|
||||
except OSError:
|
||||
self.send_error(404, "No permission to list directory")
|
||||
return None
|
||||
list.sort(key=lambda a: a.lower())
|
||||
|
@ -1123,7 +1123,7 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
|
|||
try:
|
||||
try:
|
||||
os.setuid(nobody)
|
||||
except os.error:
|
||||
except OSError:
|
||||
pass
|
||||
os.dup2(self.rfile.fileno(), 0)
|
||||
os.dup2(self.wfile.fileno(), 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue