diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-13 17:45:14 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-13 17:46:20 +0100 |
commit | da29b0b85f97f217f4c73a818e6453cb28e8da07 (patch) | |
tree | 05f1e36bcb783703c07151c7ca94714ab7115532 | |
parent | 52289ac48f7867a92051dc5ece05e992fe40a160 (diff) | |
download | oslo-context-da29b0b85f97f217f4c73a818e6453cb28e8da07.tar.gz |
Python 3: enable tests/unit/middleware/test_request_id.py
In Python 3, webob will return bytes, so we need to fix generate_request_id()
so that it also returns bytes. The behaviour is unchanged in Python 2.
Change-Id: I389cf20e4c999c9bb576a42388497852f8ba27ec
-rw-r--r-- | openstack/common/context.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack/common/context.py b/openstack/common/context.py index 09019ee..3eeb445 100644 --- a/openstack/common/context.py +++ b/openstack/common/context.py @@ -25,7 +25,7 @@ import uuid def generate_request_id(): - return 'req-%s' % str(uuid.uuid4()) + return b'req-' + str(uuid.uuid4()).encode('ascii') class RequestContext(object): |