mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-11 05:24:56 -05:00
Use the print function
In Python 3, `print` is no longer a statement. Call it as a function everywhere, and include the future import to remove the statement in Python 2 code as well. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Jan Cholasta
parent
fb7943dab4
commit
8de13bd7dd
+6
-4
@@ -18,6 +18,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import httplib
|
||||
import getpass
|
||||
@@ -340,9 +342,9 @@ if __name__ == "__main__":
|
||||
conn.connect()
|
||||
conn.request("GET", "/")
|
||||
response = conn.getresponse()
|
||||
print response.status
|
||||
print(response.status)
|
||||
#print response.msg
|
||||
print response.getheaders()
|
||||
print(response.getheaders())
|
||||
data = response.read()
|
||||
#print data
|
||||
conn.close()
|
||||
@@ -353,8 +355,8 @@ if __name__ == "__main__":
|
||||
h.putrequest('GET', '/')
|
||||
h.endheaders()
|
||||
http_status, http_reason, headers = h.getreply()
|
||||
print "status = %s %s" % (http_status, http_reason)
|
||||
print "headers:\n%s" % headers
|
||||
print("status = %s %s" % (http_status, http_reason))
|
||||
print("headers:\n%s" % headers)
|
||||
f = h.getfile()
|
||||
data = f.read() # Get the raw HTML
|
||||
f.close()
|
||||
|
||||
Reference in New Issue
Block a user