Skip to content

Commit 946177e

Browse files
committed
Make sure we split rusage.contents a maximum of one.
1 parent 7fad9cc commit 946177e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drmaa/helpers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,15 @@ def attributes_iterator(attributes):
231231

232232
def adapt_rusage(rusage):
233233
"""
234-
transform a rusage data structure into a dict
234+
Transform a rusage data structure into a dict.
235+
236+
Due to the value possibly containing a equal sign make sure we
237+
limit the splits to only the first occurrence.
235238
"""
236239
rv = dict()
237240
for attr in attributes_iterator(rusage.contents):
238-
k, v = attr.split('=')
241+
242+
k, v = attr.split('=',1)
239243
rv[k] = v
240244
return rv
241245

0 commit comments

Comments
 (0)