From 53425965677cd601606791569980c43ae88c3fef Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Sun, 22 Jan 2012 00:28:14 +0100
Subject: [PATCH] prevent traceback. Fixes #7080

---
 src/common/helpers.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/common/helpers.py b/src/common/helpers.py
index 8212242831..57f80fa11e 100644
--- a/src/common/helpers.py
+++ b/src/common/helpers.py
@@ -1432,6 +1432,8 @@ def get_proxy_info(account):
     if p:
         proxy = {}
         proxyptr = gajim.config.get_per('proxies', p)
+        if not proxyptr:
+            return proxy
         for key in proxyptr.keys():
             proxy[key] = proxyptr[key][1]
         return proxy
@@ -1542,4 +1544,4 @@ def download_image(account, attrs):
     proxy = get_proxy_info(account)
     if proxy and proxy['type'] in ('http', 'socks5'):
         return _get_img_proxy(attrs, proxy)
-    return _get_img_direct(attrs)
\ No newline at end of file
+    return _get_img_direct(attrs)
-- 
GitLab