summaryrefslogtreecommitdiff
path: root/sshban.py
diff options
context:
space:
mode:
Diffstat (limited to 'sshban.py')
-rwxr-xr-xsshban.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sshban.py b/sshban.py
index 102f4a3..11b5d4b 100755
--- a/sshban.py
+++ b/sshban.py
@@ -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)