← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1104090] Re: InvalidContentType can't be raised because of error in constructor

 

** Changed in: quantum
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to quantum.
https://bugs.launchpad.net/bugs/1104090

Title:
  InvalidContentType can't be raised because of error in constructor

Status in OpenStack Quantum (virtual network service):
  Fix Released

Bug description:
  InvalidContentType exception class is defined two times: in
  quantum.openstack.common.exception and quantum.common.exceptions with
  two different signatures.

  A lot of code like
  (https://github.com/openstack/quantum/blob/master/quantum/wsgi.py#L394)
  imports one of them but attempts to use it with the signature of
  another one, which ends with an error like:

  Error
  Traceback (most recent call last):
    File "/usr/lib/python2.7/unittest/case.py", line 327, in run
      testMethod()
    File "./repos/quantum/quantum/tests/unit/test_wsgi.py", line 225, in test_serialize_content_type_unknow
      self.assertRaises(exceptions.InvalidContentType, serializer.serialize, input_data, content_type)
    File "/usr/lib/python2.7/unittest/case.py", line 471, in assertRaises
      callableObj(*args, **kwargs)
    File "./repos/quantum/quantum/wsgi.py", line 965, in serialize
      return self._get_serialize_handler(content_type)(data)
    File "./repos/quantum/quantum/wsgi.py", line 961, in _get_serialize_handler
      raise exception.InvalidContentType(content_type=content_type)
  TypeError: __init__() got an unexpected keyword argument 'content_type'

To manage notifications about this bug go to:
https://bugs.launchpad.net/quantum/+bug/1104090/+subscriptions