Guido van Rossum  committed a76a3a3

Don't just die when an error is not defined; print a warning instead.
This for errno-challenged platforms like Windows.

  • Participants
  • Parent commits d32b8f4
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/test/

 # test seems to work on SGI, Sparc & intel Solaris, and linux.
 for error in errors:
-    a = getattr(errno, error)
-    if verbose:
-	print '%s: %d' % (error, a)
+    try:
+	a = getattr(errno, error)
+    except AttributeError:
+	if verbose:
+	    print '%s: not found' % error
+    else:
+	if verbose:
+	    print '%s: %d' % (error, a)