empty __init__.py under locale directory leading to ImportError

Bug #977021 reported by Edward
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Brian Waldon
OpenStack Compute (nova)
Fix Released
Low
Brian Waldon

Bug Description

Since empty __init__.py file under nova/nova/locale directory indicates this is a package directory, it will cause ImportError when installing the locale by gettext. The traceback looks like:

Traceback (most recent call last):
  ...
  File "/usr/lib/python2.7/gettext.py", line 508, in install
    t = translation(domain, localedir, fallback=True, codeset=codeset)
  File "/usr/lib/python2.7/gettext.py", line 480, in translation
    mofiles = find(domain, localedir, languages, all=1)
  File "/usr/lib/python2.7/gettext.py", line 437, in find
    for nelang in _expand_lang(lang):
  File "/usr/lib/python2.7/gettext.py", line 131, in _expand_lang
    from locale import normalize
ImportError: cannot import name normalize

Suggest: remove this redundant __init__.py file will resolve this problem.

Brian Waldon (bcwaldon)
Changed in glance:
assignee: nobody → Brian Waldon (bcwaldon)
Changed in nova:
assignee: nobody → Brian Waldon (bcwaldon)
Changed in glance:
status: New → In Progress
Changed in nova:
importance: Undecided → Low
status: New → In Progress
Changed in glance:
importance: Undecided → Low
Changed in nova:
milestone: none → folsom-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/6722

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/6725

Brian Waldon (bcwaldon)
Changed in glance:
milestone: none → folsom-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/6725
Committed: http://github.com/openstack/nova/commit/5af8e54bb18de0392339d49c15e038e2a808c0b3
Submitter: Jenkins
Branch: master

commit 5af8e54bb18de0392339d49c15e038e2a808c0b3
Author: Brian Waldon <email address hidden>
Date: Mon Apr 23 09:54:29 2012 -0700

    Remove __init__.py from locale dir

    Previously, the __init__.py indicated that we have a custom locale package,
    preventing imports of the locale package that ships with python itself.

    * Fixes bug 977021

    Change-Id: I5fcfb8936137b9db8a556439ca53ffeec6bbe67c

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/6747

Changed in nova:
assignee: Brian Waldon (bcwaldon) → Edward (zhang-hare)
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/6722
Committed: http://github.com/openstack/glance/commit/3a81aa9fe2fd97563627a606f7eb95170ec005e4
Submitter: Jenkins
Branch: master

commit 3a81aa9fe2fd97563627a606f7eb95170ec005e4
Author: Brian Waldon <email address hidden>
Date: Mon Apr 23 09:40:55 2012 -0700

    Remove __init__.py from locale dir

    Previously, the __init__.py indicated that we have a custom locale package,
    preventing imports of the locale package that ships with python itself.

    * Fixes bug 977021

    Change-Id: Id4921a1efd1a223790cc8b52917d00b387e9cba6

Changed in glance:
status: In Progress → Fix Committed
Brian Waldon (bcwaldon)
Changed in nova:
assignee: Edward (zhang-hare) → Brian Waldon (bcwaldon)
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: folsom-1 → 2012.2
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-1 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.