mirror of
https://github.com/adulau/ptr-db.git
synced 2024-12-22 00:35:57 +00:00
Skip missing tuples
This commit is contained in:
parent
d0dd9d700e
commit
bf85437a4b
1 changed files with 9 additions and 4 deletions
|
@ -28,10 +28,15 @@ if args.r:
|
||||||
for x in args.r:
|
for x in args.r:
|
||||||
with open(x, encoding='UTF-8', errors='ignore') as f:
|
with open(x, encoding='UTF-8', errors='ignore') as f:
|
||||||
for l in f:
|
for l in f:
|
||||||
(ip, ptr) = l.rstrip().split(',')[:2]
|
try:
|
||||||
if args.v:
|
(ip, ptr) = l.rstrip().split(',')[:2]
|
||||||
print (terms(ptr))
|
if args.v:
|
||||||
r.set(ip,ptr)
|
print(terms(ptr))
|
||||||
|
r.set(ip,ptr)
|
||||||
|
except ValueError:
|
||||||
|
if args.v:
|
||||||
|
print("PTR tuple missing")
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
argParser.print_help()
|
argParser.print_help()
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
Loading…
Reference in a new issue