Dan Kenigsberg has posted comments on this change.

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


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

(2 inline comments)

....................................................
File vdsm/hooks.py
Line 1: import os.path
You've fixed this oddity in another file!
Line 2: #
Line 3: # Copyright 2010-2011 Red Hat, Inc.
Line 4: #
Line 5: # This program is free software; you can redistribute it and/or modify


Line 59:         os.write(xmlfd, domxml or '')
Line 60:         os.close(xmlfd)
Line 61: 
Line 62:         scriptenv = os.environ.copy()
Line 63:         scriptenv.update(vmconf.get('custom', {}))
please note that some of the scriptenv elements are not inherited from the 
os.environ, but are already unicode literals. I believe that they attempting to 
decode them would not end up well.

I think that the proper solution to our problem is to encode only 
vmconf.get('custom') elements to utf8, and not to touch anything else.
Line 64:         if len(params) > 0:
Line 65:             scriptenv.update(params)
Line 66:         if vmconf.get('vmId'):
Line 67:             scriptenv['vmId'] = vmconf.get('vmId')


-- 
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: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: David Caro <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to