Author: Amaury Forgeot d'Arc <[email protected]>
Branch:
Changeset: r71543:88e8c347e2e2
Date: 2014-05-16 23:14 +0200
http://bitbucket.org/pypy/pypy/changeset/88e8c347e2e2/
Log: Fix suspect usage of AnnotatorError
diff --git a/rpython/annotator/builtin.py b/rpython/annotator/builtin.py
--- a/rpython/annotator/builtin.py
+++ b/rpython/annotator/builtin.py
@@ -14,6 +14,7 @@
from rpython.flowspace.model import Constant
import rpython.rlib.rarithmetic
import rpython.rlib.objectmodel
+from rpython.annotator.model import AnnotatorError
def constpropagate(func, args_s, s_result):
@@ -211,7 +212,7 @@
def builtin_tuple(s_iterable):
if isinstance(s_iterable, SomeTuple):
return s_iterable
- return AnnotatorError("tuple(): argument must be another tuple")
+ raise AnnotatorError("tuple(): argument must be another tuple")
def builtin_list(s_iterable):
if isinstance(s_iterable, SomeList):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit