Replace python print operator with print function.
'print' function is compatible with 2.x and 3.x python versions. Change-Id: Iac24146ba607a58fa404346d3b46b685f84b4c4f
This commit is contained in:
parent
19298d8171
commit
fee1cbb2f0
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
"""Interactive CLI for rebuilding routers
|
"""Interactive CLI for rebuilding routers
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import Queue
|
import Queue
|
||||||
|
@ -204,7 +206,7 @@ def populate_routers(db, conf, workers):
|
||||||
try:
|
try:
|
||||||
client.fetch()
|
client.fetch()
|
||||||
except (KeyboardInterrupt, SystemExit):
|
except (KeyboardInterrupt, SystemExit):
|
||||||
print "Killing background worker..."
|
print("Killing background worker...")
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
|
@ -334,7 +336,7 @@ class BrowseRouters(message.MessageSending):
|
||||||
]
|
]
|
||||||
if i + offset == self.position:
|
if i + offset == self.position:
|
||||||
args = map(self.term.reverse, args[:-3]) + args[-3:]
|
args = map(self.term.reverse, args[:-3]) + args[-3:]
|
||||||
print self.term.move(i, 0) + ' '.join(args)
|
print(self.term.move(i, 0) + ' '.join(args))
|
||||||
|
|
||||||
def make_message(self, router):
|
def make_message(self, router):
|
||||||
return {
|
return {
|
||||||
|
@ -368,8 +370,8 @@ class BrowseRouters(message.MessageSending):
|
||||||
|
|
||||||
def _exit(self):
|
def _exit(self):
|
||||||
if self.interactive:
|
if self.interactive:
|
||||||
print 'Deleting %s...' % self.fh.name
|
print('Deleting %s...' % self.fh.name)
|
||||||
self.fh.close()
|
self.fh.close()
|
||||||
os.remove(self.fh.name)
|
os.remove(self.fh.name)
|
||||||
if self.interactive:
|
if self.interactive:
|
||||||
print 'Exiting...'
|
print('Exiting...')
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -41,11 +43,11 @@ class Fake(object):
|
||||||
|
|
||||||
|
|
||||||
def delete_callback(self):
|
def delete_callback(self):
|
||||||
print 'DELETE'
|
print('DELETE')
|
||||||
|
|
||||||
|
|
||||||
def bandwidth_callback(self, *args, **kwargs):
|
def bandwidth_callback(self, *args, **kwargs):
|
||||||
print 'BANDWIDTH:', args, kwargs
|
print('BANDWIDTH:', args, kwargs)
|
||||||
|
|
||||||
|
|
||||||
def debug_one_router(args=sys.argv[1:]):
|
def debug_one_router(args=sys.argv[1:]):
|
||||||
|
|
Loading…
Reference in New Issue