Skip to content

Commit 823e572

Browse files
authored
Change hex computation to be backward compatible with Python 3.6 (#129)
* Change hex computation to be backward compatible with Python 3.6
1 parent e5b333c commit 823e572

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cterasdk/lib/crypto.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def __init__(self, certificate):
111111

112112
@property
113113
def sha1_fingerprint(self):
114-
return self.certificate.fingerprint(hashes.SHA1()).hex(':', 1)
114+
hexstr = self.certificate.fingerprint(hashes.SHA1()).hex()
115+
return ':'.join([a + b for a, b in zip(hexstr[::2], hexstr[1::2])])
115116

116117
@property
117118
def issuer(self):

docs/source/user_guides/Portal/GlobalAdmin.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ Storage Nodes
144144
.. automethod:: cterasdk.core.buckets.Buckets.modify
145145
:noindex:
146146

147+
.. code-block:: python
148+
147149
"""Modify an existing bucket, set it to read-delete only and dedicate it to 'mytenant'"""
148150
filer.buckets.modify('MainStorage', read_only=True, dedicated_to='mytenant')
149151

0 commit comments

Comments
 (0)