Compare commits
No commits in common. "fb7c3c3346320f228a10127ada752e2765c53435" and "5cfa351e6777d3bd986f71703975232e0943ce45" have entirely different histories.
fb7c3c3346
...
5cfa351e67
3 changed files with 2 additions and 19 deletions
|
|
@ -1,9 +1,3 @@
|
||||||
## 0.2.0a7 (2025-02-17)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- better error support
|
|
||||||
|
|
||||||
## 0.2.0a6 (2025-02-10)
|
## 0.2.0a6 (2025-02-10)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.cli"
|
name = "rougail.cli"
|
||||||
version = "0.2.0a7"
|
version = "0.2.0a6"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "CLI for Rougail"
|
description = "CLI for Rougail"
|
||||||
|
|
|
||||||
|
|
@ -46,19 +46,13 @@ def _main():
|
||||||
fake_rougail_config = {'step.user_data': 'environment',
|
fake_rougail_config = {'step.user_data': 'environment',
|
||||||
'environment.default_environment_name': 'ROUGAILCLI',
|
'environment.default_environment_name': 'ROUGAILCLI',
|
||||||
}
|
}
|
||||||
user_data = UserDatas(cmd_config).user_datas(RougailUserDataEnvironment(cmd_config, rougailconfig=fake_rougail_config).run())
|
UserDatas(cmd_config).user_datas(RougailUserDataEnvironment(cmd_config, rougailconfig=fake_rougail_config).run())
|
||||||
if user_data["errors"]:
|
|
||||||
raise Exception(user_data["errors"][0])
|
|
||||||
if user_data["warnings"]:
|
|
||||||
raise Exception(user_data["warnings"][0])
|
|
||||||
parser = TiramisuCmdlineParser(
|
parser = TiramisuCmdlineParser(
|
||||||
cmd_config,
|
cmd_config,
|
||||||
add_extra_options=False,
|
add_extra_options=False,
|
||||||
short_name_max_len=2,
|
short_name_max_len=2,
|
||||||
)
|
)
|
||||||
parser.parse_args()
|
parser.parse_args()
|
||||||
global print_traceback
|
|
||||||
print_traceback = rougailconfig["cli.debug"]
|
|
||||||
cmd_config.property.setdefault(origin_prop, 'read_write', 'append')
|
cmd_config.property.setdefault(origin_prop, 'read_write', 'append')
|
||||||
cmd_config.property.remove("not_for_commandline")
|
cmd_config.property.remove("not_for_commandline")
|
||||||
cmd_config.property.read_only()
|
cmd_config.property.read_only()
|
||||||
|
|
@ -135,13 +129,8 @@ def _main():
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global print_traceback
|
|
||||||
print_traceback = False
|
|
||||||
try:
|
try:
|
||||||
_main()
|
_main()
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
if print_traceback:
|
|
||||||
import traceback
|
|
||||||
traceback.print_exc()
|
|
||||||
print(_("ERROR: {0}").format(err))
|
print(_("ERROR: {0}").format(err))
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue