updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / gdesklets / make-gconf-optional.patch
blob8a9e9c2b8f800c658859cbeef76949e6112458d6
1 diff -Naur gdesklets-0.36.3.orig/shell/plugins/PackageInstaller/Downloader.py gdesklets-0.36.3/shell/plugins/PackageInstaller/Downloader.py
2 --- gdesklets-0.36.3.orig/shell/plugins/PackageInstaller/Downloader.py 2008-03-20 00:00:58.000000000 +0100
3 +++ gdesklets-0.36.3/shell/plugins/PackageInstaller/Downloader.py 2012-01-10 02:58:26.451869752 +0100
4 @@ -61,16 +61,22 @@
6 dest_fd = open(dest, "w")
8 - import gconf
9 - client = gconf.client_get_default()
10 - use_proxy = client.get_bool('/system/http_proxy/use_http_proxy')
11 - if (use_proxy != 0):
12 - host = client.get_string('/system/http_proxy/host')
13 - port = client.get_int('/system/http_proxy/port')
14 - if (host != ""):
15 - http_proxy = "http://" + host + ':' + str(port)
16 - else:
17 - http_proxy = None
18 + try:
19 + import gconf
20 + except ImportError:
21 + gconf = None
22 + if gconf:
23 + client = gconf.client_get_default()
24 + use_proxy = client.get_bool('/system/http_proxy/use_http_proxy')
25 + if (use_proxy != 0):
26 + host = client.get_string('/system/http_proxy/host')
27 + port = client.get_int('/system/http_proxy/port')
28 + if (host != ""):
29 + http_proxy = "http://" + host + ':' + str(port)
30 + else:
31 + http_proxy = None
32 + else:
33 + http_proxy = None
34 else:
35 http_proxy = None