Merge lp:~rconradharris/nova/bug706029 into lp:~hudson-openstack/nova/trunk

Proposed by Rick Harris
Status: Merged
Approved by: Jay Pipes
Approved revision: 601
Merged at revision: 601
Proposed branch: lp:~rconradharris/nova/bug706029
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 12 lines (+2/-0)
1 file modified
plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py (+2/-0)
To merge this branch: bzr merge lp:~rconradharris/nova/bug706029
Reviewer Review Type Date Requested Status
Jay Pipes (community) Approve
Josh Kearney (community) Approve
Review via email: mp+47080@code.launchpad.net

Description of the change

Adds gettext to pluginlib_nova.py. Fixes #706029.

To post a comment you must log in.
Revision history for this message
Josh Kearney (jk0) wrote :

lgtm

review: Approve
Revision history for this message
Jay Pipes (jaypipes) wrote :

Hmmm, typically gettext.install() is only called for endpoints (bin/* or runnable programs...).

Is pluginlib_nova.py an endpoint? If not, there may be a more appropriate place for this.

review: Needs Information
Revision history for this message
Rick Harris (rconradharris) wrote :

Hmm, pluginlib_nova.py is really an exceptional case in that it won't be run from within a bin/* runnable-program. Rather, it's called by a XenAPI dispatcher on the XenServer machine.

There might be a better place for it, but, I can't think of one off hand.

Alternatively, we could remove gettext entirely from pluginlib_nova, but, that doesn't seem ideal either.

Revision history for this message
Jay Pipes (jaypipes) wrote :

OK, that's a fair enough answer Rick. Makes sense to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py'
2--- plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py 2011-01-20 17:52:02 +0000
3+++ plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py 2011-01-21 19:16:04 +0000
4@@ -19,6 +19,8 @@
5 # that we need.
6 #
7
8+import gettext
9+gettext.install('nova', unicode=1)
10 import httplib
11 import logging
12 import logging.handlers