Mercurial > libervia-backend
changeset 3555:53fec6309fa3
cli: update constants to use new name
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 09 Jun 2021 17:29:29 +0200 (2021-06-09) |
parents | 184c66256bbc |
children | bb87ddfdde58 |
files | sat_frontends/jp/base.py sat_frontends/jp/constants.py |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/sat_frontends/jp/base.py Wed Jun 09 11:35:49 2021 +0200 +++ b/sat_frontends/jp/base.py Wed Jun 09 17:29:29 2021 +0200 @@ -68,7 +68,6 @@ progressbar=None #consts -PROG_NAME = "jp" DESCRIPTION = """This software is a command line tool for XMPP. Get the latest version at """ + C.APP_URL @@ -115,7 +114,7 @@ self.bridge = bridge_module.AIOBridge() self._onQuitCallbacks = [] - def get_config(self, name, section='cli', default=None): + def get_config(self, name, section=C.CONFIG_SECTION, default=None): """Retrieve a setting value from sat.conf""" return config.getConfig(self.sat_conf, section, name, default=default) @@ -435,7 +434,7 @@ '--version', action='version', version=("{name} {version} {copyleft}".format( - name = PROG_NAME, + name = C.APP_NAME, version = self.version, copyleft = COPYLEFT)) )
--- a/sat_frontends/jp/constants.py Wed Jun 09 11:35:49 2021 +0200 +++ b/sat_frontends/jp/constants.py Wed Jun 09 17:29:29 2021 +0200 @@ -23,7 +23,11 @@ class Const(constants.Const): - APP_NAME = "jp" + APP_NAME = "Libervia CLI" + APP_COMPONENT = "CLI" + APP_NAME_ALT = "jp" + APP_NAME_FILE = "libervia_cli" + CONFIG_SECTION = APP_COMPONENT.lower() PLUGIN_CMD = "commands" PLUGIN_OUTPUT = "outputs" OUTPUT_TEXT = "text" # blob of unicode text