diff options
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r-- | Lib/http/server.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py index 7167142..e549982 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -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) |