diff options
-rwxr-xr-x | sshban.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -240,7 +240,11 @@ with open(fifofd) as fifo: if len(line) == 0: continue - ts, msg = line.rstrip().split(maxsplit = 1) + parts = line.rstrip().split(maxsplit = 1) + if len(parts) != 2: + logger.error('Invalid log line: %s' % line) + continue + ts, msg = parts logger.debug('processing message: %s' % msg) res = process_msg(ts, msg) |