Adding external json mean cope with type conversion...

parent 36705048
......@@ -121,9 +121,9 @@ class NexDPI():
ipset_list = Cats[cname]['ipset']+"6"
else:
ipset_list = Cats[cname]['ipset']
if not aname.startswith(Cats[cname]['nostart']) and not sername in Cats[cname]['noapps']:
if not aname.startswith(tuple(Cats[cname]['nostart'])) and not sername in list(Cats[cname]['noapps']):
sh("ipset test "+ipset_list+" "+triplet+" >/dev/null 2>&1 || ipset add "+ipset_list+" "+triplet+" timeout "+Cats[cname]['timeout']+" > /dev/null 2>&1")
if sername in Cats[cname]['knownapps']:
if sername in list(Cats[cname]['knownapps']):
self.isknown = True
continue
......@@ -133,9 +133,9 @@ class NexDPI():
ipset_list = appd['ipset']+"6"
else:
ipset_list = appd['ipset']
if not aname.startswith(appd['nostart']):
if not aname.startswith(tuple(appd['nostart'])):
sh("ipset test "+ipset_list+" "+triplet+" >/dev/null 2>&1 || ipset add "+ipset_list+" "+triplet+" timeout "+appd['timeout']+" > /dev/null 2>&1")
if aname.startswith(appd['knowstarts']):
if aname.startswith(tuple(appd['knowstarts'])):
self.isknown = True
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment