This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgHello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1358 to look at the new patch set (#2). bsc_control.py: convert to python3 Let's be consistent with other .py in contrib and use python3 explicitly. Change-Id: I669be3e8731460d5d9229fd0459ef7dd60e8bd73 --- M openbsc/contrib/bsc_control.py 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/58/1358/2 diff --git a/openbsc/contrib/bsc_control.py b/openbsc/contrib/bsc_control.py index 66a41eb..fd6d12f 100755 --- a/openbsc/contrib/bsc_control.py +++ b/openbsc/contrib/bsc_control.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- mode: python-mode; py-indent-tabs-mode: nil -*- from optparse import OptionParser @@ -9,7 +9,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -20,7 +20,7 @@ (r, c) = Ctrl().cmd(var, value) sck.send(c) answer = Ctrl().rem_header(sck.recv(4096)) - return (answer,) + Ctrl().verify(answer, r, var, value) + return (answer,) + Ctrl().verify(answer.decode('utf-8'), r, var, value) def set_var(sck, var, val): (a, _, _) = do_set_get(sck, var, val) @@ -36,7 +36,7 @@ tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -76,18 +76,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/1358 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I669be3e8731460d5d9229fd0459ef7dd60e8bd73 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder