def writeIdentFile(self):
"""Write self.ident to oidentd's user cfg file but
keep any entries for restoring them later."""
if not os.path.isfile(IDENTFILE):
return
# In the process of connecting, acquire the lock
self.flock.acquire()
try:
with open(IDENTFILE, 'r') as ifile:
self.ifile_buf = ifile.readlines()
with open(IDENTFILE, 'w') as ifile:
ifile.write(IDENTFMT.format(self.idnt))
except Exception:
minqlx.log_exception()
评论列表
文章目录