diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-01-06 22:58:01 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-01-06 22:58:01 +0000 |
commit | 932ad379ab2d73f0ee5d9be81ad128c3904faae5 (patch) | |
tree | ae0d58a9b578348bef4ec15676684c1de1ed4f0a | |
parent | d320963d01af6066b18503ef921e342aa07d258d (diff) | |
parent | fde0bf77d6a89ee84e62461bc0d4c2cdfd809c48 (diff) | |
download | python-keystoneclient-932ad379ab2d73f0ee5d9be81ad128c3904faae5.tar.gz |
Merge "Replace textwrap with fast standard code"
-rw-r--r-- | keystoneclient/common/cms.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/keystoneclient/common/cms.py b/keystoneclient/common/cms.py index c1260d3..da72f2d 100644 --- a/keystoneclient/common/cms.py +++ b/keystoneclient/common/cms.py @@ -23,7 +23,6 @@ import base64 import errno import hashlib import logging -import textwrap import zlib from debtcollector import removals @@ -242,7 +241,7 @@ def token_to_cms(signed_text): copy_of_text = signed_text.replace('-', '/') lines = ['-----BEGIN CMS-----'] - lines += textwrap.wrap(copy_of_text, 64) + lines += [copy_of_text[n:n + 64] for n in range(0, len(copy_of_text), 64)] lines.append('-----END CMS-----\n') return '\n'.join(lines) |