Python warns with UnboundLocalError: local variable 'message' referenced before assignment Assigning the first value to message, and append later. Signed-off-by: Sven Vermeulen <sven.vermeulen@xxxxxxxxx> --- policycoreutils/semanage/seobject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py index 85bc37f..236a182 100644 --- a/policycoreutils/semanage/seobject.py +++ b/policycoreutils/semanage/seobject.py @@ -89,7 +89,7 @@ except: self.log_list=[] def log(self, msg, name = "", sename = "", serole = "", serange = "", oldsename = "", oldserole = "", oldserange = ""): - message += " %s name=%s" % (msg, name) + message = " %s name=%s" % (msg, name) if sename != "": message += " sename=" + sename if oldsename != "": -- 1.8.1.5 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with the words "unsubscribe selinux" without quotes as the message.