The new woob repository is here: This gitlab will be removed soon.

Commit 096bbef3 authored by Lucas Ficheux's avatar Lucas Ficheux Committed by Vincent A

[myedenred] Change version check for ast.Constant

ast.Constant was added in 3.6 so the module will
crash for versions 3.5.X (with X >= 1)
parent b35ea374
......@@ -174,7 +174,7 @@ def obj_type(self):
# If node, an AST node, contains a string or a number, return
# that. Otherwise, return the node itself.
def get_ast_val(node):
if sys.version_info > (3, 5) and isinstance(node, ast.Constant):
if sys.version_info >= (3, 6) and isinstance(node, ast.Constant):
return node.value
elif isinstance(node, ast.Name):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment