From d6b6933ee8fa496a224516ebc0e753c1b337cb47 Mon Sep 17 00:00:00 2001 From: lzzy12 Date: Sun, 22 Sep 2019 23:08:42 +0530 Subject: [PATCH] Remove redundant str constructors --- bot/helper/ariaTools.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot/helper/ariaTools.py b/bot/helper/ariaTools.py index e5943ff..dfb68e9 100644 --- a/bot/helper/ariaTools.py +++ b/bot/helper/ariaTools.py @@ -64,9 +64,10 @@ def progress_status(context,update,previous): file = aria2.get_download(download.gid) if not file.is_complete: if not file.error_message: - msg = ""+str(file.name) +":- " +str(file.progress_string())+" of "+str(file.total_length_string())+" at "+str(file.download_speed_string())+" ,ETA: "+str(file.eta_string()) + msg = "" + file.name +":- " + file.progress_string()+" of " + file.total_length_string() + \ + " at " + file.download_speed_string() + " ,ETA: " + file.eta_string() if previous != msg: - LOGGER.info("editing message") + LOGGER.info("Editing message") try: context.bot.edit_message_text(text=msg,message_id=update.message_id,chat_id=update.chat.id,parse_mode='HTMl') except: @@ -89,5 +90,5 @@ def progress_status(context,update,previous): return progress_status(context,update,previous=None) else: LOGGER.info(file.name+" Completed.") - msg = ""+str(file.name) +":- Uploading." + msg = "" + file.name +":- Uploading." context.bot.edit_message_text(text=msg,message_id=update.message_id,chat_id=update.chat.id,parse_mode='HTMl')