diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2018-03-18 21:50:38 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2018-03-19 12:25:50 +0100 |
commit | b977909fc93caa599e52943be25b7f6042a4c70b (patch) | |
tree | 75b02a848786f7c7cdb8c4220e7f5bc39befd8a6 /M2Crypto/Rand.py | |
parent | d15ceaa99cbe560052c7fe9ecbbc77ecfd3d18b6 (diff) | |
download | m2crypto-b977909fc93caa599e52943be25b7f6042a4c70b.tar.gz |
Replace util.py3{bytes,str} with six.ensure_{binary,text}
Diffstat (limited to 'M2Crypto/Rand.py')
-rw-r--r-- | M2Crypto/Rand.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/M2Crypto/Rand.py b/M2Crypto/Rand.py index 33f8387..4a65381 100644 --- a/M2Crypto/Rand.py +++ b/M2Crypto/Rand.py @@ -7,8 +7,8 @@ See LICENCE for the license information. """ from __future__ import absolute_import -from M2Crypto import m2, util -if util.py27plus: +from M2Crypto import m2, py27plus, six +if py27plus: from typing import AnyStr, Tuple # noqa @@ -73,11 +73,11 @@ def rand_file_name(): is set, $HOME/.rnd otherwise. If $HOME is not set either, an error occurs. """ - return util.py3str(m2.rand_file_name()) # pylint: disable=no-member + return six.ensure_text(m2.rand_file_name()) # pylint: disable=no-member def load_file(filename, max_bytes): - # type: (bytes, int) -> int + # type: (AnyStr, int) -> int """ Read a number of bytes from file filename and adds them to the PRNG. |