Commits

Lenard Lindstrom committed 11d40f6

fixes #120

Only 1.6.x raises a TypeError instead of a ValueError.

  • Participants
  • Parent commits e6b5ebf

Comments (0)

Files changed (1)

lib/_numpysurfarray.py

     """
     try:
         return numpy_array(surface.get_view('2'), copy=False)
-    except ValueError:
+    except (ValueError, TypeError):
         raise ValueError("bit depth %i unsupported for 2D reference array" %
                          (surface.get_bitsize(),))