summaryrefslogtreecommitdiff
path: root/attoconf/lib/config_hash.py
diff options
context:
space:
mode:
Diffstat (limited to 'attoconf/lib/config_hash.py')
-rw-r--r--attoconf/lib/config_hash.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/attoconf/lib/config_hash.py b/attoconf/lib/config_hash.py
index 81d4a68..b3cb423 100644
--- a/attoconf/lib/config_hash.py
+++ b/attoconf/lib/config_hash.py
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with attoconf. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function, division, absolute_import
+
from hashlib import md5
import os
@@ -25,8 +25,8 @@ from ..classy import ClassyProject
def calc_hash(build):
hash = md5()
- for var, val in sorted(build.vars.iteritems()):
- hash.update('%s = %s\n' % (var, val))
+ for var, val in sorted(build.vars.items()):
+ hash.update(('%s = %s\n' % (var, val)).encode(encoding = 'UTF-8', errors = 'strict'))
return hash.hexdigest()