Skip to content

Commit c782bc2

Browse files
committed
Replaced print operator by print function in network.asyncore_pollchoose
and unmaintained modules.
1 parent 1487cbe commit c782bc2

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/bitmessagecurses/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ def sendMessage(sender="", recv="", broadcast=None, subject="", body="", reply=F
983983
def loadInbox():
984984
"""Load the list of messages"""
985985
sys.stdout = sys.__stdout__
986-
print "Loading inbox messages..."
986+
print("Loading inbox messages...")
987987
sys.stdout = printlog
988988

989989
where = "toaddress || fromaddress || subject || message"
@@ -1035,7 +1035,7 @@ def loadInbox():
10351035
def loadSent():
10361036
"""Load the messages that sent"""
10371037
sys.stdout = sys.__stdout__
1038-
print "Loading sent messages..."
1038+
print("Loading sent messages...")
10391039
sys.stdout = printlog
10401040

10411041
where = "toaddress || fromaddress || subject || message"
@@ -1121,7 +1121,7 @@ def loadSent():
11211121
def loadAddrBook():
11221122
"""Load address book"""
11231123
sys.stdout = sys.__stdout__
1124-
print "Loading address book..."
1124+
print("Loading address book...")
11251125
sys.stdout = printlog
11261126

11271127
ret = sqlQuery("SELECT label, address FROM addressbook")
@@ -1228,7 +1228,7 @@ def run(stdscr):
12281228
def doShutdown():
12291229
"""Shutting the app down"""
12301230
sys.stdout = sys.__stdout__
1231-
print "Shutting down..."
1231+
print("Shutting down...")
12321232
sys.stdout = printlog
12331233
shutdown.doCleanShutdown()
12341234
sys.stdout = sys.__stdout__

src/network/asyncore_pollchoose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ def log(self, message):
749749
def log_info(self, message, log_type='info'):
750750
"""Conditionally print a message"""
751751
if log_type not in self.ignore_log_types:
752-
print '%s: %s' % (log_type, message)
752+
print('%s: %s' % (log_type, message))
753753

754754
def handle_read_event(self):
755755
"""Handle a read event"""

src/network/http.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ def __init__(self, host, path="/"): # pylint: disable=redefined-outer-name
1818
self.destination = (host, 80)
1919
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
2020
self.connect(self.destination)
21-
print "connecting in background to %s:%i" % (self.destination[0], self.destination[1])
21+
print("connecting in background to %s:%i" % self.destination)
2222

2323
def state_init(self):
2424
self.append_write_buf(
2525
"GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n" % (
2626
self.path, self.destination[0]))
27-
print "Sending %ib" % (len(self.write_buf))
27+
print("Sending %ib" % len(self.write_buf))
2828
self.set_state("http_request_sent", 0)
2929
return False
3030

3131
def state_http_request_sent(self):
3232
if self.read_buf:
33-
print "Received %ib" % (len(self.read_buf))
33+
print("Received %ib" % len(self.read_buf))
3434
self.read_buf = b""
3535
if not self.connected:
3636
self.set_state("close", 0)
@@ -62,13 +62,13 @@ def state_socks_handshake_done(self):
6262
for host in ("bootstrap8080.bitmessage.org", "bootstrap8444.bitmessage.org"):
6363
proxy = Socks5Resolver(host=host)
6464
while asyncore.socket_map:
65-
print "loop %s, len %i" % (proxy.state, len(asyncore.socket_map))
65+
print("loop %s, len %i" % (proxy.state, len(asyncore.socket_map)))
6666
asyncore.loop(timeout=1, count=1)
6767
proxy.resolved()
6868

6969
proxy = Socks4aResolver(host=host)
7070
while asyncore.socket_map:
71-
print "loop %s, len %i" % (proxy.state, len(asyncore.socket_map))
71+
print("loop %s, len %i" % (proxy.state, len(asyncore.socket_map)))
7272
asyncore.loop(timeout=1, count=1)
7373
proxy.resolved()
7474

0 commit comments

Comments
 (0)