| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ab6db67 commit 367c2f8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,6 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | 33 | import ast | |
| 34 | 34 | import inspect | |
| 35 | + import sys | ||
| 35 | 36 | from six import string_types | |
| 36 | 37 | from six.moves import builtins | |
| 37 | 38 | ||
@@ -97,7 +98,7 @@ def simple_eval(node_or_string, namespace=None): | |||
| 97 | 98 | node_or_string = node_or_string.body | |
| 98 | 99 | ||
| 99 | 100 | def _convert(node): | |
| 100 | - if py3 and isinstance(node, ast.Constant): | ||
| 101 | + if sys.version_info[:2] >= (3, 6) and isinstance(node, ast.Constant): | ||
| 101 | 102 | return node.value | |
| 102 | 103 | if isinstance(node, _string_type_nodes): | |
| 103 | 104 | return node.s | |
| Back | FazBrowse Home | New Git URL |
0 commit comments