diff options
author | Pacien TRAN-GIRARD | 2014-10-24 18:05:48 +0000 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2014-10-24 18:05:48 +0000 |
commit | 4403fda939ef42aeffeccb343d74f3dc3b840f91 (patch) | |
tree | 63fd704f15f3030f1455aad0ef92403c5d093c70 /sysproxy.py | |
parent | 16529a0d212e1387eacd590c0e5e1b1a13dc2641 (diff) | |
parent | bdf9099df8c2a4636b0ad0e710b73330877eef37 (diff) | |
download | wikistats-4403fda939ef42aeffeccb343d74f3dc3b840f91.tar.gz |
Merge branch 'refactor' into 'master'
Refactor
See merge request !1
Diffstat (limited to 'sysproxy.py')
-rw-r--r-- | sysproxy.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sysproxy.py b/sysproxy.py new file mode 100644 index 0000000..81867ad --- /dev/null +++ b/sysproxy.py | |||
@@ -0,0 +1,7 @@ | |||
1 | import urllib.request | ||
2 | |||
3 | |||
4 | def configure_system_proxy(): | ||
5 | proxy = urllib.request.ProxyHandler(urllib.request.getproxies()) | ||
6 | opener = urllib.request.build_opener(proxy) | ||
7 | urllib.request.install_opener(opener) | ||