瀏覽代碼

ensure string-format of auth-credentials

tags/v1.2.0
fabian 6 年之前
父節點
當前提交
b7e9fd98cd
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. 3
    3
      certbot_pdns/pdnsapi.py

+ 3
- 3
certbot_pdns/pdnsapi.py 查看文件

@@ -26,9 +26,9 @@ class PdnsApi:
26 26
         elif isinstance(verify_cert, str):          # alternative: path to local cert is given as string
27 27
             self.verify_cert = verify_cert          # see requests-documentation for more info
28 28
         
29
-    def set_http_auth(self, http_auth):             # credentials should be given as list containing two elements
30
-        if len(http_auth == 2):                     # first: username, second: password for http-basic auth
31
-            self.http_auth = (str(http_auth[0]), str(http_auth[1]))
29
+    def set_http_auth(self, http_auth):             # credentials should be given as list containing two string-elements
30
+        if len(http_auth) == 2:                     # first: username, second: password for http-basic auth
31
+            self.http_auth = (str(http_auth[0]), str(http_auth[1]))     # ensure right format of credentials
32 32
         
33 33
     def _query(self, uri, method, kwargs=None):
34 34
         headers = {

Loading…
取消
儲存