Skip to content

Commit db33413

Browse files
authored
Merge pull request #507 from yanzhudd/fix-small-issues
Fix some issues
2 parents c202918 + 707062f commit db33413

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/aaz_dev/command/controller/command_tree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def verify_updated_command_tree(self):
597597
if not group:
598598
details[' '.join(group_names)] = {
599599
'type': 'group',
600-
'help': "Miss short summary."
600+
'help': "Group not found."
601601
}
602602
elif not group.help or not group.help.short:
603603
details[' '.join(group.names)] = {
@@ -610,7 +610,7 @@ def verify_updated_command_tree(self):
610610
if not cmd:
611611
details[' '.join(cmd_names)] = {
612612
'type': 'command',
613-
'help': "Miss short summary."
613+
'help': "Command not found."
614614
}
615615
elif not cmd.help or not cmd.help.short:
616616
details[' '.join(cmd.names)] = {

src/aaz_dev/command/controller/workspace_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ def generate_to_aaz(self):
10881088
# Merge the commands of subresources which exported in aaz but not exist in current workspace
10891089
self._merge_sub_resources_in_aaz()
10901090

1091-
# in memory worspace folder does not support client cfg
1091+
# in memory workspace folder does not support client cfg
10921092
if not self.is_in_memory:
10931093
# update client config
10941094
editor = self.load_client_cfg_editor()

src/aaz_dev/swagger/model/schema/cmd_builder.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -409,14 +409,10 @@ def build_cmd_string_format(schema):
409409
if schema.pattern is not None:
410410
try:
411411
_ = re.compile(schema.pattern) # verify schema pattern
412+
fmt.pattern = schema.pattern
413+
fmt_assigned = True
412414
except Exception as err:
413-
raise exceptions.InvalidSwaggerValueError(
414-
msg=f"Invalid regex expression",
415-
key=[schema.traces],
416-
value=[schema.pattern]
417-
)
418-
fmt.pattern = schema.pattern
419-
fmt_assigned = True
415+
logger.warning('Invalid regex expression: traces: {}, pattern: {}'.format(str([schema.traces]), schema.pattern))
420416
if schema.max_length is not None:
421417
fmt.max_length = schema.max_length
422418
fmt_assigned = True

0 commit comments

Comments
 (0)