Exception assigning a StatusCode to a code_pb2 object in bot_session.py
Context
Assigning a StatusCode
object to a code_pb2
doesn't work:
https://gitlab.com/BuildGrid/buildgrid/blob/master/buildgrid/bot/bot_session.py#L158
Hence you'll get this error:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jimmacarthur/bs/buildgrid/buildgrid/bot/bot_session.py", line 158, in create_work
lease.status.code = e.code()
TypeError: <StatusCode.INVALID_ARGUMENT: (3, 'invalid argument')> has type StatusCode, but expected one of: int, long