From b6910aa68a0e3968935557c39ae1b89634bc9945 Mon Sep 17 00:00:00 2001
From: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
Date: Thu, 1 Aug 2024 22:32:40 +0300
Subject: [PATCH] sepolgen: initialize gen_cil

Avoid errors when adding comments to CIL output like in audit2allow

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
Acked-by: James Carter <jwcart2@gmail.com>
---
 python/sepolgen/src/sepolgen/refpolicy.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/python/sepolgen/src/sepolgen/refpolicy.py b/python/sepolgen/src/sepolgen/refpolicy.py
index 2ec75fbad..32278896c 100644
--- a/python/sepolgen/src/sepolgen/refpolicy.py
+++ b/python/sepolgen/src/sepolgen/refpolicy.py
@@ -1217,6 +1217,7 @@ def __init__(self, l=None):
             self.lines = l
         else:
             self.lines = []
+        self.gen_cil = False
 
     def to_string(self):
         # If there are no lines, treat this as a spacer between
