Use print_function from __future__
Makes these scripts compatible with Python3 Change-Id: I45a96415c4a66f2de87267880885fe63cfcbbe87
This commit is contained in:
		@@ -21,6 +21,7 @@ TODO(hiesel): Make real git commits instead of empty changes
 | 
			
		||||
TODO(hiesel): Add comments
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
from __future__ import print_function
 | 
			
		||||
import atexit
 | 
			
		||||
import json
 | 
			
		||||
import optparse
 | 
			
		||||
@@ -280,7 +281,7 @@ def main():
 | 
			
		||||
  (options, _) = p.parse_args()
 | 
			
		||||
  global BASE_URL
 | 
			
		||||
  BASE_URL = BASE_URL % options.port
 | 
			
		||||
  print BASE_URL
 | 
			
		||||
  print(BASE_URL)
 | 
			
		||||
 | 
			
		||||
  set_up()
 | 
			
		||||
  gerrit_users = get_random_users(options.user_count)
 | 
			
		||||
 
 | 
			
		||||
@@ -16,6 +16,7 @@
 | 
			
		||||
# Startup script for Gerrit Inspector - a Jython introspector
 | 
			
		||||
# -----------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
from __future__ import print_function
 | 
			
		||||
import sys
 | 
			
		||||
 | 
			
		||||
def print_help():
 | 
			
		||||
@@ -23,9 +24,9 @@ def print_help():
 | 
			
		||||
    if not n.startswith("__") and not n in ['help', 'reload'] \
 | 
			
		||||
       and str(type(v)) != "<type 'javapackage'>"             \
 | 
			
		||||
       and not str(v).startswith("<module"):
 | 
			
		||||
       print "\"%s\" is \"%s\"" % (n, v)
 | 
			
		||||
  print
 | 
			
		||||
  print "Welcome to the Gerrit Inspector"
 | 
			
		||||
  print "Enter help() to see the above again, EOF to quit and stop Gerrit"
 | 
			
		||||
       print("\"%s\" is \"%s\"" % (n, v))
 | 
			
		||||
  print()
 | 
			
		||||
  print("Welcome to the Gerrit Inspector")
 | 
			
		||||
  print("Enter help() to see the above again, EOF to quit and stop Gerrit")
 | 
			
		||||
 | 
			
		||||
print_help()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user