mirror of
https://github.com/adulau/ptr-db.git
synced 2024-12-21 16:26:02 +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:
|
||||
with open(x, encoding='UTF-8', errors='ignore') as f:
|
||||
for l in f:
|
||||
(ip, ptr) = l.rstrip().split(',')[:2]
|
||||
if args.v:
|
||||
print (terms(ptr))
|
||||
r.set(ip,ptr)
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue