Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
JimFuller-RedHat committed Jan 17, 2024
1 parent 51f26f1 commit de8a702
Showing 1 changed file with 48 additions and 37 deletions.
85 changes: 48 additions & 37 deletions griffon/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,19 +630,21 @@ def text_output_products_contain_component(
if not (result_tree[pv][ps][cn][nvr]["upstreams"]) and not (
result_tree[pv][ps][cn][nvr]["sources"]
):
try:
child_dep_names = re.sub(
re.escape(search_component_name),
f"[b]{search_component_name}[/b]",
", ".join(provides_components),
)
except re.error:
pass

child_dep_names = ""
if provides_components:
try:
child_dep_names = re.sub(
re.escape(search_component_name),
f"[b]{search_component_name}[/b]",
", ".join(provides_components),
)
child_dep_names = f"[{child_dep_names}]"
except re.error:
pass
console.print(
Text(ps, style=f"{product_color} b"),
dep,
f"[{child_dep_names}]",
child_dep_names,
no_wrap=no_wrap,
)
if (
Expand Down Expand Up @@ -780,19 +782,22 @@ def text_output_products_contain_component(
if not (result_tree[pv][ps][cn][nvr]["upstreams"]) and not (
result_tree[pv][ps][cn][nvr]["sources"]
):
try:
child_dep_names = re.sub(
re.escape(search_component_name),
f"[b]{search_component_name}[/b]",
", ".join(provides_components),
)
except re.error:
pass
child_dep_names = ""
if provides_components:
try:
child_dep_names = re.sub(
re.escape(search_component_name),
f"[b]{search_component_name}[/b]",
", ".join(provides_components),
)
child_dep_names = f"[{child_dep_names}]"
except re.error:
pass

console.print(
Text(ps, style=f"{product_color} b"),
dep,
f"[{child_dep_names}]",
child_dep_names,
f"[i][grey]{related_url}[/grey][/i]",
f"[i][grey]{build_source_url}[/grey][/i]",
width=1000,
Expand Down Expand Up @@ -900,19 +905,22 @@ def text_output_products_contain_component(
if not (result_tree[pv][ps][cn][nvr]["upstreams"]) and not (
result_tree[pv][ps][cn][nvr]["sources"]
):
try:
child_dep_names = re.sub(
re.escape(search_component_name),
f"[b]{search_component_name}[/b]",
", ".join(provides_components),
)
except re.error:
pass
child_dep_names = ""
if provides_components:
try:
child_dep_names = re.sub(
re.escape(search_component_name),
f"[b]{search_component_name}[/b]",
", ".join(provides_components),
)
child_dep_names = f"[{child_dep_names}]"
except re.error:
pass

console.print(
Text(ps, style=f"{product_color} b"),
dep,
f"[{child_dep_names}]",
child_dep_names,
f"[i][grey]{related_url}[/grey][/i]",
f"[i][grey]{build_source_url}[/grey][/i]",
width=1000,
Expand Down Expand Up @@ -1020,19 +1028,22 @@ def text_output_products_contain_component(
if not (result_tree[pv][ps][cn][nvr]["upstreams"]) and not (
result_tree[pv][ps][cn][nvr]["sources"]
):
try:
child_dep_names = re.sub(
re.escape(search_component_name),
f"[b]{search_component_name}[/b]",
", ".join(provides_components),
)
except re.error:
pass
child_dep_names = ""
if provides_components:
try:
child_dep_names = re.sub(
re.escape(search_component_name),
f"[b]{search_component_name}[/b]",
", ".join(provides_components),
)
child_dep_names = f"[{child_dep_names}]"
except re.error:
pass

console.print(
Text(ps, style=f"{product_color} b"),
dep,
f"[{child_dep_names}]",
child_dep_names,
f"[i][grey]{related_url}[/grey][/i]",
f"[i][grey]{build_source_url}[/grey][/i]",
width=10000,
Expand Down

0 comments on commit de8a702

Please sign in to comment.