projects
/
platform
/
upstream
/
connman.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream connman version 1.38
[platform/upstream/connman.git]
/
test
/
get-proxy-autoconfig
diff --git
a/test/get-proxy-autoconfig
b/test/get-proxy-autoconfig
index
6709a9e
..
b96e800
100755
(executable)
--- a/
test/get-proxy-autoconfig
+++ b/
test/get-proxy-autoconfig
@@
-1,12
+1,12
@@
#!/usr/bin/python
import dbus
#!/usr/bin/python
import dbus
-import urllib
+import urllib
.request, urllib.parse, urllib.error
def get_pac(url):
def get_pac(url):
- conn = urllib.urlopen(url, proxies={})
+ conn = urllib.
request.
urlopen(url, proxies={})
data = conn.read()
data = conn.read()
- print
data
+ print
(data)
conn.close()
bus = dbus.SystemBus()
conn.close()
bus = dbus.SystemBus()
@@
-23,15
+23,15
@@
for entry in services:
proxy = properties["Proxy"]
if "Method" in proxy:
proxy = properties["Proxy"]
if "Method" in proxy:
- print
"[ %s ]" % (path
)
+ print
("[ %s ]" % (path)
)
method = proxy["Method"]
method = proxy["Method"]
- print
"Method = %s" % (method
)
+ print
("Method = %s" % (method)
)
if method in ["auto"]:
url = proxy["URL"]
if method in ["auto"]:
url = proxy["URL"]
- print
"URL = %s" % (url
)
- print
+ print
("URL = %s" % (url)
)
+ print
()
get_pac(url)
else:
get_pac(url)
else:
- print
+ print
()