Skip to content

Commit e16f756

Browse files
committed
TASK: Reformat file
1 parent 158fb11 commit e16f756

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

main.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
logfile_handler = logging.handlers.WatchedFileHandler(logfile_path, 'a', 'utf-8')
3333

3434
logger = logging.getLogger(__name__)
35-
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO, handlers=[logfile_handler])
35+
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO,
36+
handlers=[logfile_handler])
3637

3738
if not re.match("[0-9]+:[a-zA-Z0-9\-_]+", BOT_TOKEN):
3839
logging.error("Bot token not correct - please check.")
@@ -140,7 +141,7 @@ def error(bot, update, error):
140141
"""Log Errors caused by Updates."""
141142
if update is None:
142143
return
143-
144+
144145
logger.warning('Update "%s" caused error "%s"', update, error)
145146

146147
db = DBwrapper.get_instance()
@@ -164,7 +165,9 @@ def admin_check(bot, update):
164165
return func(bot, update)
165166
else:
166167
update.message.reply_text('You have not the needed permissions to do that!')
167-
logger.warning("User {} ({}, @{}) tried to use admin function '{}'!".format(user.id, user.first_name, user.username, func.__name__))
168+
logger.warning(
169+
"User {} ({}, @{}) tried to use admin function '{}'!".format(user.id, user.first_name, user.username,
170+
func.__name__))
168171

169172
return admin_check
170173

0 commit comments

Comments
 (0)