Fix boolean constant detection (AST changes) in Python 3.
@@ -6,6 +6,8 @@ import ast
from os import path
+import six
+
from pyinfra.api import Config
from pyinfra.api.util import exec_file
@@ -27,6 +29,10 @@ def _extract_config_assignments(filename, config):
else:
value = None
+ # NameConstant is Python 3+ only
+ elif six.PY3 and isinstance(node.value, ast.NameConstant):
+ value = node.value.value
+
# Strings
elif isinstance(node.value, ast.Str):
value = node.value.s
