check if dir before write, and do not write if it is

This commit is contained in:
Nikos Kouremenos 2005-08-19 10:32:42 +00:00
parent 69934428b3
commit 4abf4f53b3
1 changed files with 2 additions and 0 deletions

View File

@ -119,6 +119,8 @@ class Logger:
show = nick show = nick
for f in files: for f in files:
path_to_file = os.path.join(LOGPATH, f) path_to_file = os.path.join(LOGPATH, f)
if os.path.isdir(path_to_file):
return
fil = open(path_to_file, 'a') fil = open(path_to_file, 'a')
fil.write('%s:%s:%s' % (tim, jid, show)) fil.write('%s:%s:%s' % (tim, jid, show))
if msg: if msg: