Wrong type on `job.trace()`?
stdedos opened this issue Β· comments
python-gitlab/gitlab/v4/objects/jobs.py
Lines 242 to 244 in 04c569a
In [3]: type(job.trace())
Out[3]: bytes
This might be the case, as we were probably applying typing across dozens of endpoints at the time.
If we consistently get bytes
regardless of the streamed
argument we can change that easily.
Oh ... Haven't tried the streamed=
π
Then, at least | bytes
is also needed?
Actually ... even worse? π π
In [4]: a = job.trace(streamed=True)
b'\x1b[0KRunning with gitlab-runner ...ERROR: Job failed: command terminated with exit code 1\n\x1b[0;m\n'
In [5]: repr(a)
Out[5]: 'None'
Have I messed up something? I am pretty sure that there's no excuse for a "blanket" print
to the terminal π
Full disclosure, I'm running against 15.10.2-ee - but I don't think that that should affect
Would you kindly check from your end?
So when using streamed=True
it will by default just print()
the data. If that is not desired, then the action
argument must specify a function to call that accepts the streamed data.