wip: add log when database is edited
This commit is contained in:
parent
442d4c6c44
commit
3fbbfdfc1a
|
@ -1211,7 +1211,7 @@ def create_DB(post_db):
|
||||||
|
|
||||||
# log
|
# log
|
||||||
msg_log = 'Create Database: %s'%post_db
|
msg_log = 'Create Database: %s'%post_db
|
||||||
log.append_f(post_logs,msg_log,0)
|
log.append_f(post_logs, msg_log, 0)
|
||||||
|
|
||||||
# Main Post Conf
|
# Main Post Conf
|
||||||
lines_conf = (
|
lines_conf = (
|
||||||
|
|
|
@ -137,13 +137,16 @@ def manage_wip(file_post, Force):
|
||||||
check.post_wip[0], check.post_wip[1])
|
check.post_wip[0], check.post_wip[1])
|
||||||
tmp_post_wip = (hash_wip, time_wip)
|
tmp_post_wip = (hash_wip, time_wip)
|
||||||
post_wip = 'post_wip = %s'%str(tmp_post_wip)
|
post_wip = 'post_wip = %s'%str(tmp_post_wip)
|
||||||
print(rep_post_wip, '>>', post_wip)
|
|
||||||
|
|
||||||
|
# Replace post_wip in DB
|
||||||
with open(check.post_db, 'r') as file:
|
with open(check.post_db, 'r') as file:
|
||||||
filedata = file.read()
|
filedata = file.read()
|
||||||
filedata = filedata.replace(rep_post_wip, post_wip)
|
filedata = filedata.replace(rep_post_wip, post_wip)
|
||||||
with open(check.post_db, 'w') as file:
|
with open(check.post_db, 'w') as file:
|
||||||
file.write(filedata)
|
file.write(filedata)
|
||||||
|
# log
|
||||||
|
msg_log = 'Edit Database: %s'%check.post_db
|
||||||
|
log.append_f(check.post_logs, msg_log, 0)
|
||||||
|
|
||||||
|
|
||||||
#============================#
|
#============================#
|
||||||
|
|
Loading…
Reference in New Issue