Skip to content

Commit bbef1f9

Browse files
author
Gauvain Pocentek
committed
[cli] Output: handle bytes in API responses
Closes #548
1 parent bdbec67 commit bbef1f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gitlab/v4/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,3 +366,6 @@ def run(gl, what, action, args, verbose, output, fields):
366366
printer.display(get_dict(data, fields), verbose=verbose, obj=data)
367367
elif isinstance(data, six.string_types):
368368
print(data)
369+
else:
370+
# We assume we got bytes
371+
print(data.decode())

0 commit comments

Comments
 (0)