summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorJosef Gustafsson <josef.gson@gmail.com>2015-09-10 16:48:18 +0200
committerJosef Gustafsson <josef.gson@gmail.com>2015-09-10 16:48:18 +0200
commitf82ccc4913c94edc4f33c1c2dd6cf44c9a6f4423 (patch)
treedda1b135edcff9cbe255bddfad589e2a63d28f90 /monitor
parent5a0cf1d976f90f6bc769e5e660323564b85a9a4b (diff)
optimizing putting new domains
Diffstat (limited to 'monitor')
-rwxr-xr-xmonitor/josef_leveldb.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/monitor/josef_leveldb.py b/monitor/josef_leveldb.py
index e1c402e..1d3bdbd 100755
--- a/monitor/josef_leveldb.py
+++ b/monitor/josef_leveldb.py
@@ -156,11 +156,13 @@ def db_lookup_domain(db, domain):
if match_domain(cur_domain, item):
# print item
try:
- tmp = db.Get(item)
+ tmp = db.Get(item).split(SEP)
# print tmp
- if tmp[0] == '{':
- res.append(tmp)
- next_level += tmp.split(SEP)
+ for tmp_item in tmp:
+ if tmp_item[0] == '{':
+ res.append(tmp_item)
+ else:
+ next_level.append(tmp_item)
except KeyError:
# print "Could not find " + item
pass