Преглед изворни кода

[update]没有代理时 不返回None

jhao104 пре 8 година
родитељ
комит
b1018a96aa
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Api/ProxyApi.py

+ 1 - 1
Api/ProxyApi.py

@@ -44,7 +44,7 @@ def index():
 @app.route('/get/')
 def get():
     proxy = ProxyManager().get()
-    return proxy
+    return proxy if proxy else 'no proxy!'
 
 
 @app.route('/refresh/')