Skip to content

Commit

Permalink
fixed a bug with "cmx -log" (#1410)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfursin committed Feb 19, 2025
1 parent 0e42582 commit a9a74a0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions cm/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## CMX V4.1.2.1
- fixed a bug with "cmx -log" (#1410)
- fixed a bug with "cmx -repro" (#1409)

## CMX V4.1.2
- fixed error reporting in cm/cmx info artifact if artifact not found
- added "cmx get repo" or "cmx get repo {repo alias}" or "cm get repo" (#1405)
Expand Down
2 changes: 1 addition & 1 deletion cm/cmind/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, config_file = None):
"error_prefix": "CM error:",
"error_prefix2": "CMX detected a problem",
"info_cli": "cm {action} {automation} {artifact(s)} {flags} @input.yaml @input.json",
"info_clix": "cmx {action} {automation} {artifact(s)} {CMX control flags (-)} {CMX automation flags (--)}\ncmx -h",
"info_clix": "cmx {action} {automation} {artifact(s)} {CMX control flags (-)} {CMX automation flags (--)}\nRun `cmx -h` to display help",

"default_home_dir": "CM",

Expand Down
10 changes: 5 additions & 5 deletions cm/cmind/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ def log(self, s, t = 'info'):

if logger != None:
if t == 'debug':
self.logger.debug(s)
logger.debug(s)
elif t == 'warning':
self.logger.warning(s)
logger.warning(s)
elif t == 'error':
self.logger.error(s)
logger.error(s)
# info
else:
self.logger.info(s)
logger.info(s)

return

Expand Down Expand Up @@ -908,7 +908,7 @@ def x(self, i, out = None):
ii['control'] = {}
for k in control:
if not k.startswith('_') and k not in ['repro']:
ii['control'][k] = i[k]
ii['control'][k] = control[k]

utils.save_json(os.path.join('cmx-repro', 'cmx-input.json'),
meta = ii)
Expand Down

0 comments on commit a9a74a0

Please sign in to comment.