File tree Expand file tree Collapse file tree 3 files changed +603
-594
lines changed Expand file tree Collapse file tree 3 files changed +603
-594
lines changed Original file line number Diff line number Diff line change @@ -133,12 +133,15 @@ def about_simvue(ctx) -> None:
133
133
"""Display full information on Simvue instance"""
134
134
width = shutil .get_terminal_size ().columns
135
135
click .echo (
136
- "\n " .join (f" { ' \t ' * int (0.015 * width )} { r } " for r in SIMVUE_LOGO .split ("\n " ))
136
+ "\n " .join (" \t " * int (0.015 * width ) + f" { r } " for r in SIMVUE_LOGO .split ("\n " ))
137
137
)
138
138
click .echo (f"\n { width * '=' } \n " )
139
- click .echo (f"\n { '\t ' * int (0.04 * width )} Provided under the Apache-2.0 License" )
140
139
click .echo (
141
- f"{ '\t ' * int (0.04 * width )} © Copyright { datetime .datetime .now ().strftime ('%Y' )} Simvue Development Team\n "
140
+ "\n " + "\t " * int (0.04 * width ) + "Provided under the Apache-2.0 License"
141
+ )
142
+ click .echo (
143
+ "\t " * int (0.04 * width )
144
+ + f"© Copyright { datetime .datetime .now ().strftime ('%Y' )} Simvue Development Team\n "
142
145
)
143
146
out_table : list [list [str ]] = []
144
147
with contextlib .suppress (importlib .metadata .PackageNotFoundError ):
@@ -156,7 +159,7 @@ def about_simvue(ctx) -> None:
156
159
out_table .append (["Server Version: " , server_version ])
157
160
click .echo (
158
161
"\n " .join (
159
- f" { ' \t ' * int (0.045 * width )} { r } "
162
+ " \t " * int (0.045 * width ) + f" { r } "
160
163
for r in tabulate .tabulate (out_table , tablefmt = "plain" )
161
164
.__str__ ()
162
165
.split ("\n " )
Original file line number Diff line number Diff line change @@ -191,7 +191,12 @@ def create_objects_display(
191
191
row .append (str (i ))
192
192
193
193
for column in columns :
194
- value = getattr (obj , column , "N/A" )
194
+ # FIXME: Hack for if a property has not been added to the API yet
195
+ if not (value := getattr (obj , column , None )):
196
+ try :
197
+ value = obj ._get_attribute (column )
198
+ except KeyError :
199
+ value = "N/A"
195
200
if formatter := COLUMN_FORMAT .get (column ):
196
201
row .append (formatter (value , plain_text , out_config ))
197
202
else :
You can’t perform that action at this time.
0 commit comments