#1140944 crmsh: autopkgtests fail: AttributeError: module 'ast' has no attribute 'Num'

Package:
crmsh
Source:
crmsh
Submitter:
Andrey Rakhmatullin
Date:
2026-06-28 15:51:02 UTC
Severity:
normal
#1140944#5
Date:
2026-06-28 15:50:28 UTC
From:
To:
=================================== FAILURES
===================================
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/usr/share/crmsh/tests/unittests/test_scripts.py:896:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/share/crmsh/tests/unittests/test_scripts.py:890: in runtest
    a1 = scripts.verify(scrpt,
/usr/lib/python3/dist-packages/crmsh/scripts.py:2198: in verify
    actions = _process_actions(script, params)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/crmsh/scripts.py:2173: in _process_actions
    when = str(action['when']).strip()
           ^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/crmsh/scripts.py:134: in __str__
    return str(minieval(inp, lenv)).lower()
               ^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/crmsh/minieval.py:370: in minieval
    return SimpleEval(env).evaluate(expr)
           ^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <crmsh.minieval.SimpleEval object at 0x7f5601729010>
names = {'stringtest': 'balloon', 'nodes': None, 'dry_run': 'no', 'action':
None, ...}

    def __init__(self, names):
        """
            Create the evaluator instance.  Set up valid operators (+,-, etc)
            functions (add, random, get_val, whatever) and names. """

        operators = DEFAULT_OPERATORS
        names = names.copy()
        names.update(DEFAULT_NAMES)

        self.operators = operators
        self.names = names

        self.nodes = {
            ^^^^^^^
            ast.Str: self._eval_str,
            ast.Name: self._eval_name,
            ast.UnaryOp: self._eval_unaryop,
            ast.BinOp: self._eval_binop,
            ast.BoolOp: self._eval_boolop,
            ast.Compare: self._eval_compare,
            ast.IfExp: self._eval_ifexp,
            ast.keyword: self._eval_keyword,
            ast.Subscript: self._eval_subscript,
            ast.Attribute: self._eval_attribute,
            ast.Index: self._eval_index,
            ast.Slice: self._eval_slice,
        }
E       AttributeError: module 'ast' has no attribute 'Num'

/usr/lib/python3/dist-packages/crmsh/minieval.py:186: AttributeError

              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/usr/share/crmsh/tests/unittests/test_ui_sbd.py:579:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/crmsh/ui_sbd.py:590: in do_purge
    sbd.SBDManager.restart_cluster_if_possible()
/usr/lib/python3/dist-packages/crmsh/sbd.py:565: in restart_cluster_if_possible
    bootstrap.restart_cluster()
/usr/lib/python3/dist-packages/crmsh/bootstrap.py:2911: in restart_cluster
    utils.cluster_run_cmd("crm cluster restart")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cmd = 'crm cluster restart', node_list = []

    def cluster_run_cmd(cmd, node_list=[]):
        """
        Run cmd in cluster nodes
        """
        nodelist = node_list or list_cluster_nodes()
        if not nodelist:
/usr/lib/python3/dist-packages/crmsh/utils.py:1743: ValueError
----------------------------- Captured stdout call
-----------------------------
.EXT cibadmin -Q
=========================== short test summary info
============================
FAILED test_scripts.py::test_when_expression - AttributeError: module 'ast' has
no attribute 'Num'
FAILED test_ui_sbd.py::TestSBD::test_do_purge - ValueError: Failed to get node
list from cluster