Skip to content

Commit c164c09

Browse files
committed
Fix error strings containing "b" literal prefixes.
1 parent 5c15720 commit c164c09

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drmaa/errors.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,11 @@ def error_check(code):
146146
if code == 0:
147147
return
148148
else:
149+
error_string = "code {0}: {1}".format(code, error_buffer.value.decode())
149150
try:
150-
raise _ERRORS[code - 1]("code {0}: {1}".format(code,
151-
error_buffer.value))
151+
raise _ERRORS[code - 1](error_string)
152152
except IndexError:
153-
raise DrmaaException("code {0}: {1}".format(code,
154-
error_buffer.value))
153+
raise DrmaaException(error_string)
155154

156155
# da vedere: NO_RUSAGE, NO_MORE_ELEMENTS
157156
_ERRORS = [InternalException,

0 commit comments

Comments
 (0)