Skip to content

Commit

Permalink
Rename "bool" to "output"
Browse files Browse the repository at this point in the history
"bool" is a built-in function, so while this works, it is a bit weird
and masks the built-in function.
  • Loading branch information
rlaager committed Jan 27, 2019
1 parent 588199c commit 4607279
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions auth_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,20 @@ 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])))

sys.stdout.write(token)
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
Expand Down

0 comments on commit 4607279

Please sign in to comment.