laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/28741 )
Change subject: pySim-shell: Add a "version" command to print the pySim package version
......................................................................
pySim-shell: Add a "version" command to print the pySim package version
It may be interesting to know which pySim-shell version a user is running.
Change-Id: Ib9a1fbff71aa8a2cfbaca9e23efcf7c68bf5af1a
Closes: OS#5459
---
M pySim-shell.py
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim-shell.py b/pySim-shell.py
index f9ab115..ce6efb8 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -447,6 +447,11 @@
"""Echo (print) a string on the console"""
self.poutput(opts.string)
+ @cmd2.with_category(CUSTOM_CATEGORY)
+ def do_version(self, opts):
+ """Print the pySim software version."""
+ import pkg_resources
+ self.poutput(pkg_resources.get_distribution('pySim'))
@with_default_category('pySim Commands')
class PySimCommands(CommandSet):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28741
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib9a1fbff71aa8a2cfbaca9e23efcf7c68bf5af1a
Gerrit-Change-Number: 28741
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/28741 )
Change subject: pySim-shell: Add a "version" command to print the pySim package version
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28741
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib9a1fbff71aa8a2cfbaca9e23efcf7c68bf5af1a
Gerrit-Change-Number: 28741
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Sat, 23 Jul 2022 10:56:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/28741 )
Change subject: pySim-shell: Add a "version" command to print the pySim package version
......................................................................
pySim-shell: Add a "version" command to print the pySim package version
It may be interesting to know which pySim-shell version a user is running.
Change-Id: Ib9a1fbff71aa8a2cfbaca9e23efcf7c68bf5af1a
Closes: OS#5459
---
M pySim-shell.py
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/41/28741/1
diff --git a/pySim-shell.py b/pySim-shell.py
index f9ab115..ce6efb8 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -447,6 +447,11 @@
"""Echo (print) a string on the console"""
self.poutput(opts.string)
+ @cmd2.with_category(CUSTOM_CATEGORY)
+ def do_version(self, opts):
+ """Print the pySim software version."""
+ import pkg_resources
+ self.poutput(pkg_resources.get_distribution('pySim'))
@with_default_category('pySim Commands')
class PySimCommands(CommandSet):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28741
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib9a1fbff71aa8a2cfbaca9e23efcf7c68bf5af1a
Gerrit-Change-Number: 28741
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange