Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
RESIF
ws-statistics
Commits
7439f1e2
Commit
7439f1e2
authored
Jan 21, 2021
by
Jerome Touvier
Browse files
datetime not JSON serializable
parent
e2b1f0ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/output.py
View file @
7439f1e2
...
...
@@ -175,6 +175,7 @@ def format_results(params, data):
for
row
in
data
:
if
row
[
2
]:
row
[
2
]
=
format
(
row
[
2
],
","
)
+
f
" (
{
humanize_size
(
row
[
2
])
}
)"
data
=
[[
str
(
val
)
for
val
in
row
]
for
row
in
data
]
return
data
...
...
@@ -205,7 +206,6 @@ def get_column_widths(data, header=None):
def
records_to_text
(
params
,
data
,
sep
=
" "
):
text
=
""
header
=
get_header
(
params
)
data
=
[[
str
(
val
)
for
val
in
row
]
for
row
in
data
]
if
params
[
"format"
]
==
"text"
:
sizes
=
get_column_widths
(
data
,
header
)
# pad header and rows according to the maximum column width
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment