From 05e5bbd508eb5b713aef28bf0a266e5e1af0e062 Mon Sep 17 00:00:00 2001 From: pengtao Date: Tue, 20 Aug 2019 12:20:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=94=E5=9B=9Elocaltion?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ad_tasks.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ad_tasks.py b/ad_tasks.py index 998ce78..3fd4f36 100644 --- a/ad_tasks.py +++ b/ad_tasks.py @@ -99,13 +99,14 @@ def send_cache_data(): print(f"0={item}") temp = {} temp['jump_param'] = item['jump_param'] - pdb.set_trace() if not isinstance(item.get('ad_property', {}), dict): - item['ad_property'] = json.loads(item.get('ad_property', {})) - item['ad_property'].update(temp) + if not item.get('ad_property', {}): + item['ad_property']={}.update(temp) + else: + item['ad_property'] = json.loads(item.get('ad_property', {})).update(temp) item['ad_property']=json.dumps(item['ad_property']) print(f"1={item}") - except Except: + except Exception: log.error(f"write {item}",exc_info=True) all.append(item)