diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 20:02:39 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 20:02:39 (GMT) |
commit | ad28c7f9dad791567afa0624acfb3ba430851965 (patch) | |
tree | 02095e5f567d6be1de31ffd858d21233b51675dd /Lib/linecache.py | |
parent | a19195984922ce89e7695c93b3bb45c3e0e6d732 (diff) | |
download | cpython-ad28c7f9dad791567afa0624acfb3ba430851965.zip cpython-ad28c7f9dad791567afa0624acfb3ba430851965.tar.gz cpython-ad28c7f9dad791567afa0624acfb3ba430851965.tar.bz2 |
Issue #16706: get rid of os.error
Diffstat (limited to 'Lib/linecache.py')
-rw-r--r-- | Lib/linecache.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/linecache.py b/Lib/linecache.py index c3f2c3f..71dc93d 100644 --- a/Lib/linecache.py +++ b/Lib/linecache.py @@ -59,7 +59,7 @@ def checkcache(filename=None): continue # no-op for files loaded via a __loader__ try: stat = os.stat(fullname) - except os.error: + except OSError: del cache[filename] continue if size != stat.st_size or mtime != stat.st_mtime: @@ -118,7 +118,7 @@ def updatecache(filename, module_globals=None): try: stat = os.stat(fullname) break - except os.error: + except OSError: pass else: return [] |