TwistedTestCase.test_help fails if there are non-ascii characters in gflags help strings

Bug #733151 reported by Soren Hansen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Unassigned

Bug Description

I translated one string into Danish, just for giggles, and since then, I've been getting this whenever I run the test suite:
======================================================================
ERROR: test_help (nova.tests.test_twistd.TwistdTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/soren/src/openstack/nova/avoid-zombie-chains/nova/tests/test_twistd.py", line 52, in test_help
    self.assertRaises(SystemExit, options.parseOptions, ['--help'])
  File "/usr/lib/python2.7/unittest/case.py", line 465, in assertRaises
    callableObj(*args, **kwargs)
  File "/home/soren/src/openstack/nova/avoid-zombie-chains/nova/twistd.py", line 160, in parseOptions
    self.postOptions()
  File "/home/soren/src/openstack/nova/avoid-zombie-chains/nova/twistd.py", line 169, in postOptions
    self._doHandlers()
  File "/home/soren/src/openstack/nova/avoid-zombie-chains/nova/twistd.py", line 136, in _doHandlers
    handler()
  File "/usr/lib/python2.7/dist-packages/twisted/python/usage.py", line 180, in opt_help
    print self.__str__()
  File "/home/soren/src/openstack/nova/avoid-zombie-chains/nova/twistd.py", line 142, in __str__
    return str(FLAGS)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 4409: ordinal not in range(128)

Related branches

Soren Hansen (soren)
Changed in nova:
importance: Undecided → Low
status: New → In Progress
assignee: nobody → Soren Hansen (soren)
Revision history for this message
Soren Hansen (soren) wrote :

Apparently, it's a gflags problem. Filed http://code.google.com/p/python-gflags/issues/detail?id=6

Soren Hansen (soren)
Changed in nova:
status: In Progress → Triaged
assignee: Soren Hansen (soren) → nobody
Revision history for this message
Russell Bryant (russellb) wrote :

This was fixed upstream in gflags. Nova also no longer uses gflags anyway, so I'm going to close this out as no longer an issue.

Changed in nova:
status: Triaged → Fix Released
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.