Skip to content

Commit

Permalink
Merge branch 'release/0.7.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-blanchard committed Jan 6, 2014
2 parents 0d523f9 + 8f7c95b commit 2ae54b2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ License
Changelog
~~~~~~~~~

- v0.7.5

- Fix an issue where dictionary attributes (like ``jtEnvironment``) could
encounter ``UnicodeDecodeError``s upon assignment.
- v0.7.4
- Switch to using preferred encoding from ``locale`` module for converting
Expand Down
9 changes: 7 additions & 2 deletions drmaa/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,13 @@ def __init__(self, name):
self.name = name

def __set__(self, instance, value):
v = ["{0}={1}".format(k, v).encode(ENCODING) for (k, v) in
value.items()]
v = []
for k, v in value.items():
if isinstance(k, bytes):
k = k.decode(ENCODING)
if isinstance(v, bytes):
v = v.decode(ENCODING)
v.append("{0}={1}".format(k, v).encode(ENCODING))
c(drmaa_set_vector_attribute, instance, self.name,
string_vector(v))

Expand Down
2 changes: 1 addition & 1 deletion drmaa/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
:author: Dan Blanchard ([email protected])
'''

__version__ = '0.7.4'
__version__ = '0.7.5'
VERSION = tuple(int(x) for x in __version__.split('.'))
2 changes: 1 addition & 1 deletion test/testwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SubmitBase(unittest.TestCase):
def setUp(self):
self.jt = jt = Session.createJobTemplate()
jt.remoteCommand = 'python'
jt.args = ['-c', "print 'hello from python!'"]
jt.args = ['-c', "print('hello from python!')"]
if hasattr(self, 'jt_tweaks'):
self.jt_tweaks()
self.jid = Session.runJob(jt)
Expand Down

0 comments on commit 2ae54b2

Please sign in to comment.