Fix two unqualified except: clauses.

This came out of SF bug #411881.
This commit is contained in:
Guido van Rossum 2001-04-10 15:44:33 +00:00
parent 6274fff287
commit e9901f325e
1 changed files with 4 additions and 4 deletions

View File

@ -92,16 +92,16 @@ class _posixfile_:
def dup(self):
import posix
try: ignore = posix.fdopen
except: raise AttributeError, 'dup() method unavailable'
if not hasattr(posix, 'fdopen'):
raise AttributeError, 'dup() method unavailable'
return posix.fdopen(posix.dup(self._file_.fileno()), self._file_.mode)
def dup2(self, fd):
import posix
try: ignore = posix.fdopen
except: raise AttributeError, 'dup() method unavailable'
if not hasattr(posix, 'fdopen'):
raise AttributeError, 'dup() method unavailable'
posix.dup2(self._file_.fileno(), fd)
return posix.fdopen(fd, self._file_.mode)