Skip missing tuples

This commit is contained in:
Alexandre Dulaunoy 2014-01-12 22:29:02 +01:00
parent d0dd9d700e
commit bf85437a4b

View file

@ -28,10 +28,15 @@ if args.r:
for x in args.r:
with open(x, encoding='UTF-8', errors='ignore') as f:
for l in f:
try:
(ip, ptr) = l.rstrip().split(',')[:2]
if args.v:
print(terms(ptr))
r.set(ip,ptr)
except ValueError:
if args.v:
print("PTR tuple missing")
pass
else:
argParser.print_help()
exit(1)