From 7d633c5e204e33aafb0007c301d9cf615f1a4722 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sat, 26 Jan 2019 20:49:43 -0600 Subject: [PATCH] Rename "bool" "bool" is a built-in function, so while this works, it is a bit weird and masks the built-in function. --- auth_mysql.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/auth_mysql.py b/auth_mysql.py index 22e26e5..a0efdd1 100755 --- a/auth_mysql.py +++ b/auth_mysql.py @@ -94,10 +94,10 @@ def ejabberd_in(): return income -def ejabberd_out(bool): - logging.debug("Ejabberd gets: %s" % bool) +def ejabberd_out(output): + logging.debug("Ejabberd gets: %s" % output) - token = genanswer(bool) + token = genanswer(output) logging.debug("sent bytes: %#x %#x %#x %#x" % (ord(token[0]), ord(token[1]), ord(token[2]), ord(token[3]))) @@ -105,9 +105,9 @@ def ejabberd_out(bool): sys.stdout.flush() -def genanswer(bool): +def genanswer(answer): answer = 0 - if bool: + if answer: answer = 1 token = struct.pack('>hh', 2, answer) return token