summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLumír 'Frenzy' Balhar <frenzy.madness@gmail.com>2016-12-13 16:37:39 +0100
committerToshio Kuratomi <a.badger@gmail.com>2016-12-13 07:38:07 -0800
commit0db1c770416f4060374dbdc99753935857f6d770 (patch)
tree57de8ab623542df7bac42feef7bf39c0c48d9c9b
parentddc8d3d98892575f059542277576798671ead578 (diff)
downloadansible-0db1c770416f4060374dbdc99753935857f6d770.tar.gz
Fix AST nodes for Python 3 and enable dependent test_uri (#18597)
* Enable tests on python 3 for uri * Added one more node type to SAFE_NODES into safe_eval module. ast.USub represents unary operators. This is necessary for parsing some unusual but still valid JSON files during testing with Python 3. (cherry picked from commit 84544ee8fd69b1345b969d89335f49c085a4fecb)
-rw-r--r--lib/ansible/template/safe_eval.py1
-rw-r--r--test/utils/shippable/python3-test-tag-blacklist.txt1
2 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/template/safe_eval.py b/lib/ansible/template/safe_eval.py
index dd41b3a381..76df7ed11e 100644
--- a/lib/ansible/template/safe_eval.py
+++ b/lib/ansible/template/safe_eval.py
@@ -69,6 +69,7 @@ def safe_eval(expr, locals={}, include_exceptions=False):
ast.Name,
ast.Str,
ast.Sub,
+ ast.USub,
ast.Tuple,
ast.UnaryOp,
)
diff --git a/test/utils/shippable/python3-test-tag-blacklist.txt b/test/utils/shippable/python3-test-tag-blacklist.txt
index 97c8d8f86f..849074ada2 100644
--- a/test/utils/shippable/python3-test-tag-blacklist.txt
+++ b/test/utils/shippable/python3-test-tag-blacklist.txt
@@ -1,3 +1,2 @@
test_hg
test_service
-test_uri