From b2cc1b1ff5f7ea8290e698d78a4a1edcafecae9b Mon Sep 17 00:00:00 2001 From: alban Date: Tue, 13 Oct 2020 22:00:10 +0200 Subject: [PATCH] [fix] clitools toRedis should not accept empty input --- clitools/exports/toRedis.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clitools/exports/toRedis.py b/clitools/exports/toRedis.py index 626991a..36381b8 100644 --- a/clitools/exports/toRedis.py +++ b/clitools/exports/toRedis.py @@ -8,11 +8,11 @@ redis exporter v0.1.0 -A basic exporter +A basic exporter LICENCE : CC -by cocoa +by cocoa ''' @@ -21,7 +21,7 @@ import sys import os import argparse import redis -import time +import time argsparser = argparse.ArgumentParser(description="Redis exporter LJ") argsparser.add_argument("-i","--ip",help="IP address of the Redis server ",default="127.0.0.1",type=str) @@ -47,6 +47,7 @@ try: line = sys.stdin.readline() if line == "": time.sleep(0.01) + continue line = line.rstrip('\n') line=line[1:-1] line = line.replace("[",'(')