fixeria has submitted this change. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/44037?usp=email )
Change subject: osmo-s1gw-cli.py: fix default category name with newer cmd2
......................................................................
osmo-s1gw-cli.py: fix default category name with newer cmd2
Change-Id: Ib2b5ef325cfc379db65a627d219caadd41c255d5
---
M contrib/osmo-s1gw-cli.py
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/contrib/osmo-s1gw-cli.py b/contrib/osmo-s1gw-cli.py
index 0249d5e..bcfd812 100755
--- a/contrib/osmo-s1gw-cli.py
+++ b/contrib/osmo-s1gw-cli.py
@@ -185,7 +185,10 @@
self.intro = cmd2.stylize(intro, cmd2.Color.RED)
else: # older cmd2 (e.g. 2.x)
self.intro = cmd2.style(intro, fg=cmd2.Fg.RED)
- self.default_category = 'Built-in commands'
+ if hasattr(cmd2.Cmd, 'DEFAULT_CATEGORY'): # newer cmd2
+ cmd2.Cmd.DEFAULT_CATEGORY = 'Built-in commands'
+ else: # older cmd2 (e.g. 2.x)
+ self.default_category = 'Built-in commands'
self.prompt = 'OsmoS1GW# '
self.tablefmt = 'github' # default table format for tabulate
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/44037?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ib2b5ef325cfc379db65a627d219caadd41c255d5
Gerrit-Change-Number: 44037
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>