fixed pylint issues
This commit is contained in:
parent
d47c869f0b
commit
3640641ab0
@ -214,12 +214,12 @@ def set_admin_handler(message):
|
||||
if user is None:
|
||||
bot.reply_to(message, "Error: User with entered telegram id is not registered.")
|
||||
return
|
||||
|
||||
|
||||
try:
|
||||
if admin == "True" or admin == "true":
|
||||
if admin in ("True", "true"):
|
||||
user.admin = True
|
||||
|
||||
elif admin == "False" or admin == "false":
|
||||
elif admin in ("False", "false"):
|
||||
user.admin = False
|
||||
|
||||
session.commit()
|
||||
@ -229,10 +229,6 @@ def set_admin_handler(message):
|
||||
session.rollback()
|
||||
bot.reply_to(message, "Something went wrong")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@bot.message_handler(commands=['scoreboard', 'Scoreboard'])
|
||||
def send_scoreboard(message):
|
||||
|
Loading…
Reference in New Issue
Block a user