mirror of
https://github.com/adulau/pdns-qof-server.git
synced 2024-11-22 01:57:07 +00:00
Numbers for count and time_first/time_last + rdata key error fixed
This commit is contained in:
parent
a7e3cdc77c
commit
82330c1036
1 changed files with 4 additions and 4 deletions
|
@ -35,7 +35,7 @@ def getFirstSeen(t1 = None, t2 = None):
|
|||
rec = "s:"+t1.lower()+":"+t2.lower()
|
||||
recget = r.get(rec)
|
||||
if recget is not None:
|
||||
return recget.decode(encoding='UTF-8')
|
||||
return int(recget.decode(encoding='UTF-8'))
|
||||
|
||||
def getLastSeen(t1 = None, t2 = None):
|
||||
if t1 is None or t2 is None:
|
||||
|
@ -43,7 +43,7 @@ def getLastSeen(t1 = None, t2 = None):
|
|||
rec = "l:"+t1.lower()+":"+t2.lower()
|
||||
recget = r.get(rec)
|
||||
if recget is not None:
|
||||
return recget.decode(encoding='UTF-8')
|
||||
return int(recget.decode(encoding='UTF-8'))
|
||||
|
||||
def getCount(t1 = None, t2 = None):
|
||||
if t1 is None or t2 is None:
|
||||
|
@ -51,7 +51,7 @@ def getCount(t1 = None, t2 = None):
|
|||
rec = "o:"+t1.lower()+":"+t2.lower()
|
||||
recget = r.get(rec)
|
||||
if recget is not None:
|
||||
return recget.decode(encoding='UTF-8')
|
||||
return int(recget.decode(encoding='UTF-8'))
|
||||
|
||||
def getRecord(t = None):
|
||||
if t is None:
|
||||
|
@ -72,7 +72,7 @@ def getRecord(t = None):
|
|||
rrval['count'] = getCount(t1=t, t2=rdata)
|
||||
rrval['rrtype'] = rr['Type']
|
||||
rrval['rrname'] = t
|
||||
rrval['rrdata'] = rdata
|
||||
rrval['rdata'] = rdata
|
||||
rrfound.append(rrval)
|
||||
return rrfound
|
||||
|
||||
|
|
Loading…
Reference in a new issue