Skip to content

Commit

Permalink
Change hex computation to be backward compatible with Python 3.6 (#129)
Browse files Browse the repository at this point in the history
* Change hex computation to be backward compatible with Python 3.6
  • Loading branch information
saimonation committed Jul 15, 2021
1 parent e5b333c commit 823e572
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cterasdk/lib/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def __init__(self, certificate):

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

@property
def issuer(self):
Expand Down
2 changes: 2 additions & 0 deletions docs/source/user_guides/Portal/GlobalAdmin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ Storage Nodes
.. automethod:: cterasdk.core.buckets.Buckets.modify
:noindex:

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

0 comments on commit 823e572

Please sign in to comment.