瀏覽代碼

added whitespaces

rinpatch 6 年之前
父節點
當前提交
cd1374d2f2
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1
    2
      searx/engines/currency_convert.py

+ 1
- 2
searx/engines/currency_convert.py 查看文件

@@ -44,7 +44,6 @@ def request(query, params):
44 44
     if not m:
45 45
         # wrong query
46 46
         return params
47
-
48 47
     amount, from_currency, to_currency = m.groups()
49 48
     amount = float(amount)
50 49
     from_currency = name_to_iso4217(from_currency.strip())
@@ -64,7 +63,7 @@ def request(query, params):
64 63
 
65 64
 def response(resp):
66 65
     """remove first and last lines to get only json"""
67
-    json_resp = resp.text[resp.text.find('\n')+1:resp.text.rfind('\n')-2]
66
+    json_resp = resp.text[resp.text.find('\n') + 1:resp.text.rfind('\n') - 2]
68 67
     results = []
69 68
     try:
70 69
         conversion_rate = float(json.loads(json_resp)['conversion']['converted-amount'])