On 12/13/2013 05:17 AM, Yuriy Taraday wrote:
Hello, Adam.

On Tue, Dec 10, 2013 at 6:55 PM, Adam Young <ayo...@redhat.com <mailto:ayo...@redhat.com>> wrote:

    With only a change to the import and requirements, it builds and
    runs, but raises:


    Traceback (most recent call last):
      File "keystone/tests/test_revoke.py", line 65, in
    test_list_is_sorted
        valid_until=valid_until))
      File "keystone/contrib/revoke/core.py", line 74, in __init__
        setattr(self, k, v)
      File "keystone/contrib/revoke/core.py", line 82, in scope_type
        self._scope_type = ScopeType[value]
      File
    "/opt/stack/keystone/.venv/lib/python2.7/site-packages/enum/__init__.py",
    line 352, in __getitem__
        return cls._member_map_[name]
    KeyError: 1


Looks like you're doing this the wrong way. Python 3.4's enums work either as EnumClass(value) or as EnumClass[name], not as EnumClass[value] as it seems your test is doing and flufl is allowing it to.

--

Kind regards, Yuriy.


_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Yep,  figured that out, but thanks for the pointer.
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to