From 597755d610fa7beec7cc9c854fc06132eb2ba485 Mon Sep 17 00:00:00 2001 From: pengtao Date: Thu, 26 Sep 2019 17:16:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BC=93=E5=AD=98=E7=94=9F?= =?UTF-8?q?=E6=88=90=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ad_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ad_tasks.py b/ad_tasks.py index f7e17c9..b6e2b7d 100644 --- a/ad_tasks.py +++ b/ad_tasks.py @@ -129,7 +129,7 @@ def send_cache_data(): for line in all: if line: locationids = json.loads(line.get('locationid')) - for locationid in str(locationids).replace('[','').replace(']','').split(','): + for locationid in str(locationids).strip('[]').split(','): locationid = locationid.strip() area_all = get_area_by_locationid(locationid) for area in area_all.split(','):