remove file after import
This commit is contained in:
parent
b8fa300676
commit
d5dfcfff33
2
main.py
2
main.py
@ -6,6 +6,7 @@ import config
|
||||
import telebot
|
||||
from telebot import apihelper, types
|
||||
from importer import Importer
|
||||
import os
|
||||
|
||||
apihelper.proxy = {'https': config.proxy}
|
||||
|
||||
@ -46,6 +47,7 @@ def handle_file(message):
|
||||
bot.reply_to(message,"Added\n"+src)
|
||||
imp = Importer(src, config.zabbix_user, config.zabbix_pass, config.zabbix_api)
|
||||
imp.create_host()
|
||||
os.remove(src)
|
||||
bot.reply_to(message, imp.debug)
|
||||
else:
|
||||
bot.reply_to(message, "What is it?")
|
||||
|
Loading…
Reference in New Issue
Block a user