Browse Source

Convert to Python 3: `urlparse` -> `urllib.parse`

Alois Mahdal 2 years ago
parent
commit
eff1b63f9e
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      doc/examples/example_test.py

+ 2
- 2
doc/examples/example_test.py View File

@@ -4,7 +4,7 @@ import http.client
4 4
 import operator
5 5
 import subprocess
6 6
 import unittest
7
-import urlparse
7
+import urllib.parse
8 8
 
9 9
 from sznqalibs import hoover
10 10
 
@@ -46,7 +46,7 @@ class CgiCalcDriver(BaseCalcDriver):
46 46
 
47 47
     def _get_data(self):
48 48
         pq = "op=%(op)s&a=%(a)s&b=%(b)s" % self._args
49
-        parsed_url = urlparse.urlparse(self._settings['uri'])
49
+        parsed_url = urllib.parse.urlparse(self._settings['uri'])
50 50
         conn = http.client.HTTPConnection(parsed_url.hostname)
51 51
         conn.request("GET", "%s?%s" % (parsed_url.path, pq))
52 52
         resp = conn.getresponse()