Fix referenced before assignment error
PATCH 1/1 Fix referenced before assignment error
Python warns with
UnboundLocalError: local variable 'message' referenced before assignment
Assigning the first value to message, and append later.
Signed-off-by Sven Vermeulen <[email protected]>
--- policycoreutils/semanage/seobject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/semanage/seobject.py +1 -1
@@ -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 != "":
Signature · 7 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Stephen Smalley
AppliedQuoted 7 lines · Sven Vermeulen
Python warns with
UnboundLocalError: local variable 'message' referenced before assignment
Assigning the first value to message, and append later.
Signed-off-by Sven Vermeulen <[email protected]>
Thanks, applied.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.