[issue16715] Get rid of IOError. Use OSError instead

py.user report at bugs.python.org
Wed Jan 9 00:49:27 CET 2013


py.user added the comment:

found a typo (removed LoadError)

commit 80f2b1273e8c0e1a28fabe537ae9c5acbbcee187
Author: Andrew Svetlov <andrew.svetlov at gmail.com>
Date:   Tue Dec 25 16:47:37 2012 +0200

    Replace IOError with OSError (#16715)
    
...

diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py
index a77dc3f..7928e9b 100644
--- a/Lib/http/cookiejar.py
+++ b/Lib/http/cookiejar.py

...

@@ -1786,7 +1786,7 @@ class FileCookieJar(CookieJar):
             self._cookies = {}
             try:
                 self.load(filename, ignore_discard, ignore_expires)
-            except (LoadError, IOError):
+            except OSError:
                 self._cookies = old_state
                 raise

----------
nosy: +py.user

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16715>
_______________________________________


More information about the Python-bugs-list mailing list