From b9124614e1c98be66f5b4843b168abc2cec6474f Mon Sep 17 00:00:00 2001 From: madchucky <33758259+madchucky@users.noreply.github.com> Date: Wed, 6 Dec 2017 15:07:41 +0100 Subject: [PATCH] Make the substitution more explicit Different way of substituting the length of the string in format string as the %-formatting is called the "old %-formatting" in the documentation, be it for python: - 2.7 https://docs.python.org/2.7/library/string.html?highlight=string#module-string - 3.6 https://docs.python.org/3.6/library/string.html?highlight=string#module-string --- mega/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mega/utils.py b/mega/utils.py index 108f350..d1382ea 100644 --- a/mega/utils.py +++ b/mega/utils.py @@ -7,7 +7,7 @@ def a32_to_str(a): - return struct.pack('>%dI' % len(a), *a) + return struct.pack('>{}I'.format(len(a)), *a) def aes_cbc_encrypt(data, key):