diff --git a/auth-mastodon.py b/auth-mastodon.py index efc9714..3084213 100644 --- a/auth-mastodon.py +++ b/auth-mastodon.py @@ -47,7 +47,13 @@ try: # Connect to the DB, set autocommit and readonly otherwise postgresql seems to have a # tendency to keep things "idle in transaction" and table locks eventually grind # Mastodon to a halt. We don't make any changes anyway. - database = psycopg2.connect(host=db_host, user=db_user, password=db_pass, database=db_name, port=db_port) + database = psycopg2.connect( + host=db_host, + user=db_user, + password=db_pass, + database=db_name, + port=db_port, + ) database.set_session(readonly=True, autocommit=True) logging.debug(database.get_dsn_parameters()) except: @@ -103,7 +109,9 @@ def ejabberd_out(bool): token = genanswer(bool) - logging.debug("sent bytes: %#x %#x %#x %#x" % (token[0], token[1], token[2], token[3])) + logging.debug( + "sent bytes: %#x %#x %#x %#x" + % (token[0], token[1], token[2], token[3])) sys.stdout.buffer.write(token) sys.stdout.buffer.flush()