Author: Philip Jenvey <[email protected]>
Branch: py3.3
Changeset: r74099:cc09e8a517b4
Date: 2014-10-22 17:15 -0700
http://bitbucket.org/pypy/pypy/changeset/cc09e8a517b4/

Log:    utilize IsADirectoryError

diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py
--- a/pypy/interpreter/app_main.py
+++ b/pypy/interpreter/app_main.py
@@ -286,9 +286,7 @@
         try:
             sys.stdin = sys.__stdin__ = create_stdio(
                 0, False, "<stdin>", encoding, errors, unbuffered)
-        except OSError as e:
-            if e.errno != errno.EISDIR:
-                raise
+        except IsADirectoryError:
             import os
             print("Python error: <stdin> is a directory, cannot continue",
                   file=sys.stderr)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to