| 257 | ## JV export http_proxy from .gconf |
| 258 | sys_dir = '/system/http_proxy' |
| 259 | client = gconf.client_get_default() |
| 260 | use_proxy = client.get_string('/system/proxy/mode') |
| 261 | if use_proxy != 'none': |
| 262 | http_host = client.get_string('%s/host' % sys_dir) |
| 263 | http_port = client.get_int('%s/port' % sys_dir) |
| 264 | use_auth = client.get_bool('%s/use_authentication' % sys_dir) |
| 265 | proxy_string = '%s:%d' % (http_host, http_port) |
| 266 | if use_auth is True: |
| 267 | auth_user = client.get_string('%s/authentication_user' % sys_dir) |
| 268 | auth_pass = client.get_string('%s/authentication_password' % sys_dir) |
| 269 | proxy_info = '%s:%s@%s' % (auth_user, auth_pass, proxy_string) |
| 270 | else: |
| 271 | proxy_info = proxy_string |
| 272 | os.environ['http_proxy'] = 'http://%s' % proxy_info |
| 273 | else: |
| 274 | pass |
| 275 | |