diff feedworm.py @ 194:2c91b5653878

enable/disable using the proxy via a preference setting
author dirk
date Fri, 07 Oct 2011 07:00:44 +0200
parents 5b131f82057d
children 66d1efcb8e8a
line wrap: on
line diff
--- a/feedworm.py	Sat Sep 24 08:07:23 2011 +0200
+++ b/feedworm.py	Fri Oct 07 07:00:44 2011 +0200
@@ -7,12 +7,12 @@
 import sys
 
 def setupProxy(preferences):
-    if preferences.isProxyConfigured():
+    if preferences.isProxyConfigured() and preferences.useProxy():
         proxyHost = preferences.proxyHost()
         proxyPort = preferences.proxyPort()
         proxy = QNetworkProxy(QNetworkProxy.HttpProxy, proxyHost, proxyPort)
         QNetworkProxy.setApplicationProxy(proxy)
-    
+
 if __name__ == '__main__':
     logging.basicConfig(level=logging.DEBUG)
     backend = BackendFactory.createBackend()