laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/39612?usp=email )
Change subject: pySim-shell: obey quit command in startup commands+scripts
......................................................................
pySim-shell: obey quit command in startup commands+scripts
Startup scripts are executed using the cmd2 provided onecmd_plus_hooks
method. This method can run arbitrary commands, which also includes
the command "run_scrit" that we use to execute startup scripts.
When a script executes a quit command, or when someone issues a quit
command using the --execute-command or the command argument, then
this commands is executed. However a quit command won't actually quit
the process. All it does is to change the return code of
app.onecmd_plus_hooks (see [1]). So we must evaluate the return code
and take care of the quitting ourselves.
[1] https://cmd2.readthedocs.io/en/0.9.15/api/cmd.html#cmd2.cmd2.Cmd.onecmd_plu…
Related: OS#6731
Change-Id: Ic6e9c54cdb6955d65011af3eb5a025eee5da4143
---
M pySim-shell.py
1 file changed, 9 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py
index 9733b22..c59e481 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -1159,14 +1159,18 @@
# Run optional commands
for c in opts.execute_command:
if not startup_errors:
- app.onecmd_plus_hooks(c)
+ stop = app.onecmd_plus_hooks(c)
+ if stop == True:
+ sys.exit(0)
else:
print("Errors during startup, refusing to execute command (%s)" % c)
# Run optional command
if opts.command:
if not startup_errors:
- app.onecmd_plus_hooks('{} {}'.format(opts.command, ' '.join(opts.command_args)))
+ stop = app.onecmd_plus_hooks('{} {}'.format(opts.command, ' '.join(opts.command_args)))
+ if stop == True:
+ sys.exit(0)
else:
print("Errors during startup, refusing to execute command (%s)" % opts.command)
@@ -1177,7 +1181,9 @@
print("Error: script file (%s) not readable!" % opts.script)
startup_errors = True
else:
- app.onecmd_plus_hooks('{} {}'.format('run_script', opts.script), add_to_history = False)
+ stop = app.onecmd_plus_hooks('{} {}'.format('run_script', opts.script), add_to_history = False)
+ if stop == True:
+ sys.exit(0)
else:
print("Errors during startup, refusing to execute script (%s)" % opts.script)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39612?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ic6e9c54cdb6955d65011af3eb5a025eee5da4143
Gerrit-Change-Number: 39612
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39609?usp=email )
Change subject: trx_toolkit/transceiver: Spellcheck
......................................................................
trx_toolkit/transceiver: Spellcheck
Noticed by Jenkins:
https: //gerrit.osmocom.org/c/osmocom-bb/+/39328/1/src/target/trx_toolkit/transceiver.py#134
Change-Id: Id2a59d6db53c7f90cd21a056da8b1ac4d85e0373
---
M src/target/trx_toolkit/transceiver.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/src/target/trx_toolkit/transceiver.py b/src/target/trx_toolkit/transceiver.py
index e6af013..e3a457f 100644
--- a/src/target/trx_toolkit/transceiver.py
+++ b/src/target/trx_toolkit/transceiver.py
@@ -119,7 +119,7 @@
immediately. Instead, they are being scheduled prematurely.
The rationale is that both transceiver and the L1 implementation
- are separete processes that are not perfectly synchronized in time.
+ are separate processes that are not perfectly synchronized in time.
Moreover, the transceiver needs some time to prepare a burst for
transmission. This is why the time difference between Uplink and
Downlink is actually much higher on practice (20 TDMA frame periods
@@ -131,7 +131,7 @@
the transmit queue until the appropriate time of transmission.
The API user is supposed to call recv_data_msg() in order to obtain
- a L12TRX message on the TRXD (data) inteface, so it gets queued by
+ a L12TRX message on the TRXD (data) interface, so it gets queued by
this function. Then, to ensure the timeous transmission, the user
of this implementation needs to call clck_tick() on each TDMA
frame. Both functions are thread-safe (queue mutex).
@@ -288,7 +288,7 @@
"is not running => dropping..." % (self, msg.desc_hdr()))
return None
- # Enque the message, it will be sent later
+ # Enqueue the message, it will be sent later
self.tx_queue_append(msg)
return msg
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39609?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id2a59d6db53c7f90cd21a056da8b1ac4d85e0373
Gerrit-Change-Number: 39609
Gerrit-PatchSet: 1
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/39611?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: vty: Add cmd to look up route
......................................................................
vty: Add cmd to look up route
Implement a command which allows looking up a given route, similar to
linux "ip route get", which is helpful to debug routing setup.
Related: SYS#7112
Change-Id: I4dbe04862c018a1beea253de99404adb88bb7f4b
---
M src/osmo_ss7_vty.c
M tests/vty/osmo_stp_route_prio.vty
M tests/vty/osmo_stp_test.vty
3 files changed, 53 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/11/39611/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39611?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I4dbe04862c018a1beea253de99404adb88bb7f4b
Gerrit-Change-Number: 39611
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>