mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
serialize: handle case where proxy is None
This commit is contained in:
parent
30763a6555
commit
992a634a77
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,8 @@ proxy_modes = ['socks4', 'socks5', 'http']
|
|||
import util
|
||||
|
||||
def serialize_proxy(p):
|
||||
if type(p) != dict:
|
||||
return None
|
||||
return ':'.join([p.get('mode'),p.get('host'), p.get('port')])
|
||||
|
||||
def deserialize_proxy(s):
|
||||
|
|
Loading…
Add table
Reference in a new issue