fixeria has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw 
refs/changes/37/44037/1

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: newchange
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ib2b5ef325cfc379db65a627d219caadd41c255d5
Gerrit-Change-Number: 44037
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>

Reply via email to