From 3b1939fe277131502ad97c10c496a92d615dc391 Mon Sep 17 00:00:00 2001 From: Josef Gustafsson Date: Mon, 28 Sep 2015 10:17:16 +0200 Subject: compability fixed for runnning without leveldb --- monitor/josef_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'monitor/josef_monitor.py') diff --git a/monitor/josef_monitor.py b/monitor/josef_monitor.py index c2307a5..94880b9 100755 --- a/monitor/josef_monitor.py +++ b/monitor/josef_monitor.py @@ -445,7 +445,7 @@ def main(args): # Save info about monitored domains domain_dict = [] - if len monitored_domains > 0: + if len(monitored_domains) > 0: for md in monitored_domains: domain_dict.append(md.to_dict()) open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict)) @@ -456,7 +456,7 @@ if __name__ == '__main__': if not os.path.exists(CONFIG.OUTPUT_DIR): os.makedirs(CONFIG.OUTPUT_DIR) - if not os.path.exists(CONFIG.DB_PATH): + if CONFIG.DB_PATH and not os.path.exists(CONFIG.DB_PATH): os.makedirs(CONFIG.DB_PATH) main(args) -- cgit v1.1