From 946177e495ccc0f5e498ad63b4efacd42cc15e3c Mon Sep 17 00:00:00 2001 From: Thomas Green Date: Thu, 2 Jul 2015 11:12:41 +0100 Subject: [PATCH 1/2] Make sure we split rusage.contents a maximum of one. --- drmaa/helpers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drmaa/helpers.py b/drmaa/helpers.py index 43f4fd3..5610fbc 100644 --- a/drmaa/helpers.py +++ b/drmaa/helpers.py @@ -231,11 +231,15 @@ def attributes_iterator(attributes): def adapt_rusage(rusage): """ - transform a rusage data structure into a dict + Transform a rusage data structure into a dict. + + Due to the value possibly containing a equal sign make sure we + limit the splits to only the first occurrence. """ rv = dict() for attr in attributes_iterator(rusage.contents): - k, v = attr.split('=') + + k, v = attr.split('=',1) rv[k] = v return rv From 6b77c74fe59d18e1d3cc58ee4a8525bd61334bc0 Mon Sep 17 00:00:00 2001 From: Thomas Green Date: Thu, 2 Jul 2015 11:32:56 +0100 Subject: [PATCH 2/2] Update version. --- drmaa/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drmaa/version.py b/drmaa/version.py index d5b78e8..cfc0040 100644 --- a/drmaa/version.py +++ b/drmaa/version.py @@ -22,5 +22,5 @@ :author: Dan Blanchard (dblanchard@ets.org) ''' -__version__ = '0.7.6' +__version__ = '0.7.7' VERSION = tuple(int(x) for x in __version__.split('.'))