mirror of
https://gitlab.com/oloturia/fumcaso.git
synced 2025-01-06 21:47:17 +01:00
fixed file not closed
This commit is contained in:
parent
43fa7d6992
commit
9ebd2a8748
1 changed files with 3 additions and 1 deletions
|
@ -12,7 +12,9 @@ def newStrip(bot, update, args):
|
|||
status = createStrip(config)
|
||||
if status == 0:
|
||||
try:
|
||||
bot.send_photo(chat_id=update.message.chat_id,photo=open(config["saveLocation"]+config["filename"],"rb"))
|
||||
strip_file=open(config["saveLocation"]+config["filename"],"rb")
|
||||
bot.send_photo(chat_id=update.message.chat_id,photo=strip_file)
|
||||
strip_file.close()
|
||||
except Exception as err:
|
||||
print(err)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue