diff options
author | Ceridwen <ceridwenv@gmail.com> | 2015-09-21 16:33:32 -0400 |
---|---|---|
committer | Ceridwen <ceridwenv@gmail.com> | 2015-09-21 16:33:32 -0400 |
commit | 5789efaa3963569bc1060cfee5f15726d806e70c (patch) | |
tree | 34806989657c0f66f1afb338d1fc8508ce18909b /astroid/test_utils.py | |
parent | 93fb564e69b77c1b697e942f39de3bdd1172399b (diff) | |
download | astroid-5789efaa3963569bc1060cfee5f15726d806e70c.tar.gz |
Add helper function for reraising exceptions
Diffstat (limited to 'astroid/test_utils.py')
-rw-r--r-- | astroid/test_utils.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/astroid/test_utils.py b/astroid/test_utils.py index c1cadbb..4ebb4ba 100644 --- a/astroid/test_utils.py +++ b/astroid/test_utils.py @@ -2,10 +2,11 @@ import functools import sys -import six - from astroid import nodes from astroid import builder +from astroid import util + + # The name of the transient function that is used to # wrap expressions to be extracted when calling # extract_node. @@ -180,9 +181,7 @@ def require_version(minver=None, maxver=None): try: return tuple(int(v) for v in string.split('.')) except ValueError: - six.reraise(ValueError, - ValueError('%s is not a correct version : should be X.Y[.Z].' % version), - sys.exc_info()[2]) + util.reraise(ValueError('%s is not a correct version : should be X.Y[.Z].' % version)) def check_require_version(f): current = sys.version_info[:3] |