in cont_to_dict if replaced by get
This commit is contained in:
parent
ea750b0cfc
commit
2a995eabd5
Binary file not shown.
@ -293,10 +293,11 @@ class Tunnel:
|
|||||||
if "," in dns:
|
if "," in dns:
|
||||||
dns = dns[:-1]
|
dns = dns[:-1]
|
||||||
endpoint = final_dict["Endpoint"]
|
endpoint = final_dict["Endpoint"]
|
||||||
if "PresharedKey" in final_dict:
|
try:
|
||||||
pre_key = final_dict["PresharedKey"]
|
pre_key = final_dict.get("PresharedKey")
|
||||||
else:
|
pre_key = final_dict.get("PreSharedKey")
|
||||||
pre_key = final_dict["PreSharedKey"]
|
finally:
|
||||||
|
pass
|
||||||
return address, dns, endpoint, pre_key
|
return address, dns, endpoint, pre_key
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
x
Reference in New Issue
Block a user