From 820c9725dc2bce98e3227a9328a301b65f0e1e60 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Wed, 5 Jul 2000 21:10:16 +0000 Subject: open_ex(): Transfor OSError into IOError correctly (this is a disgusting hack). --- Mailman/Utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Mailman/Utils.py') diff --git a/Mailman/Utils.py b/Mailman/Utils.py index 7d15b79f3..4c52042b0 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -568,8 +568,9 @@ def open_ex(filename, mode='r', bufsize=-1, perms=0664): fp = os.fdopen(fd, mode, bufsize) return fp # transform any os.errors into IOErrors - except os.error, e: - raise IOError, e + except OSError, e: + e.__class__ = IOError + raise IOError, e, sys.exc_info()[2] finally: os.umask(ou) -- cgit v1.2.3-70-g09d2