yf_yzl 2 jaren geleden
bovenliggende
commit
4cac4b2f5a
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      crond_script/crond_weather.py

+ 2 - 2
crond_script/crond_weather.py

@@ -86,11 +86,11 @@ def main():
         pid = row.pid     # 110100000000
         province_id = city_id[:2]
         province = province_dict.get(province_id)
-        if len(pid) == 2 and city == "市辖区":
+        if len(pid) == 2 and temp == "市辖区":
             # 处理 市辖区 只有两级,区为空
             city = province
             district = "市辖区"
-        elif len(pid) ==2 and city != "市辖区":
+        elif len(pid) ==2 and temp != "市辖区":
             # 三级 省 市  区(县)
             city = temp
             district = ""