Commits

Amaury Forgeot d'Arc committed 51190b9

Use OverflowError for timeout float->long conversion, it's more precise than ValueError.

  • Participants
  • Parent commits 1a3c85b
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/module/thread/os_lock.py

     else:
         timeout *= 1e6
         if timeout > float(TIMEOUT_MAX):
-            raise OperationError(space.w_ValueError, space.wrap(
+            raise OperationError(space.w_OverflowError, space.wrap(
                     "timeout value is too large"))
         microseconds = r_longlong(timeout)
     return microseconds