Fix the behavior of a for loop when some log files are not present (make use of the list slice operator [:])

This commit is contained in:
Marc-Olivier Barre 2010-01-06 17:55:45 +01:00
parent c385cfc104
commit 3f0bbad220
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ class ladilog (gtk.glade.XML):
if 'max_lines' not in self.param_dict:
self.param_dict['max_lines'] = max_lines_default
for log in self.log_files:
for log in self.log_files[:]:
log['logfile_path'] = self.param_dict[log['config_name']]
# skip logfiles that dont exist
if not os.access(log['logfile_path'], os.R_OK):