Change in vdsm[master]: Fix the charset conversion logic in hooks.py

danken at redhat.com danken at redhat.com
Tue Jun 18 20:19:14 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: Fix the charset conversion logic in hooks.py
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(2 inline comments)

Thanks! But I wish I could understand the issue better.

....................................................
Commit Message
Line 7: Fix the charset conversion logic in hooks.py
Line 8: 
Line 9: The proper way to convert text from byte oriented string to unicode
Line 10: is to call str.decode(encoding). This patch fixes this and makes
Line 11: Jenkins tests work for people with diacritics in their names.
Could you elaborate why Jenkins fails due to this bug? How does the author name trickles into the runHook test? Could you reproduce this from the command line?
Line 12: 
Line 13: Change-Id: I9063291f8a4a392b2913220fe2839386dcffd825


....................................................
File vdsm/hooks.py
Line 69:         scriptenv['_hook_domxml'] = xmlname
Line 70: 
Line 71:         # Encode the values to UTF-8
Line 72:         # We have to decode them first, because os.environ contains
Line 73:         # everything in the byte-string form and it will blow up on ascii
the English text is not clear ("it" is mentioned twice, relating to different things.)
Line 74:         # codec error without it
Line 75:         for k, v in scriptenv.iteritems():
Line 76:             scriptenv[k] = v.decode(sys.stdin.encoding).encode('utf-8')
Line 77: 


-- 
To view, visit http://gerrit.ovirt.org/15856
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9063291f8a4a392b2913220fe2839386dcffd825
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: David Caro <dcaroest at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list