mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-27 07:48:33 +03:00
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
This commit is contained in:
@@ -447,6 +447,11 @@ class PysimApp(cmd2.Cmd):
|
|||||||
"""Echo (print) a string on the console"""
|
"""Echo (print) a string on the console"""
|
||||||
self.poutput(opts.string)
|
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')
|
@with_default_category('pySim Commands')
|
||||||
class PySimCommands(CommandSet):
|
class PySimCommands(CommandSet):
|
||||||
|
|||||||
Reference in New Issue
Block a user