[fix] clitools toRedis should not accept empty input
This commit is contained in:
parent
18aaa1b625
commit
b2cc1b1ff5
@ -8,11 +8,11 @@
|
|||||||
redis exporter
|
redis exporter
|
||||||
v0.1.0
|
v0.1.0
|
||||||
|
|
||||||
A basic exporter
|
A basic exporter
|
||||||
|
|
||||||
LICENCE : CC
|
LICENCE : CC
|
||||||
|
|
||||||
by cocoa
|
by cocoa
|
||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
@ -21,7 +21,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
import redis
|
import redis
|
||||||
import time
|
import time
|
||||||
|
|
||||||
argsparser = argparse.ArgumentParser(description="Redis exporter LJ")
|
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)
|
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()
|
line = sys.stdin.readline()
|
||||||
if line == "":
|
if line == "":
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
|
continue
|
||||||
line = line.rstrip('\n')
|
line = line.rstrip('\n')
|
||||||
line=line[1:-1]
|
line=line[1:-1]
|
||||||
line = line.replace("[",'(')
|
line = line.replace("[",'(')
|
||||||
|
Loading…
Reference in New Issue
Block a user