Skip to content
Snippets Groups Projects
Commit 53425965 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

prevent traceback. Fixes #7080

parent b6b4236d
No related branches found
No related tags found
No related merge requests found
...@@ -1432,6 +1432,8 @@ def get_proxy_info(account): ...@@ -1432,6 +1432,8 @@ def get_proxy_info(account):
if p: if p:
proxy = {} proxy = {}
proxyptr = gajim.config.get_per('proxies', p) proxyptr = gajim.config.get_per('proxies', p)
if not proxyptr:
return proxy
for key in proxyptr.keys(): for key in proxyptr.keys():
proxy[key] = proxyptr[key][1] proxy[key] = proxyptr[key][1]
return proxy return proxy
...@@ -1542,4 +1544,4 @@ def download_image(account, attrs): ...@@ -1542,4 +1544,4 @@ def download_image(account, attrs):
proxy = get_proxy_info(account) proxy = get_proxy_info(account)
if proxy and proxy['type'] in ('http', 'socks5'): if proxy and proxy['type'] in ('http', 'socks5'):
return _get_img_proxy(attrs, proxy) return _get_img_proxy(attrs, proxy)
return _get_img_direct(attrs) return _get_img_direct(attrs)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment