Author: Armin Rigo <[email protected]>
Branch:
Changeset: r57440:365f1bf3e43e
Date: 2012-09-20 19:42 +0200
http://bitbucket.org/pypy/pypy/changeset/365f1bf3e43e/
Log: Change "raise ValueError" that should no longer occur into simple
"assert" statements.
diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py
--- a/pypy/interpreter/error.py
+++ b/pypy/interpreter/error.py
@@ -21,8 +21,7 @@
_application_traceback = None
def __init__(self, w_type, w_value, tb=None):
- if not we_are_translated() and w_type is None:
- raise ValueError
+ assert w_type is not None
self.setup(w_type)
self._w_value = w_value
self._application_traceback = tb
@@ -326,8 +325,7 @@
self.xstrings = strings
for i, attr in entries:
setattr(self, attr, args[i])
- if not we_are_translated() and w_type is None:
- raise ValueError
+ assert w_type is not None
def _compute_value(self):
lst = [None] * (len(formats) + len(formats) + 1)
for i, attr in entries:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit