From 84b4681184165888f26e8988a705764baad18e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 13 Aug 2015 09:59:33 +0200 Subject: Change hash calculating function Previous method of calculating hash wasn't work (wouldn't give same result for same configuration) if there would be added new configuration options to hashconfigsort file. --- scripts/configurations.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/configurations.py b/scripts/configurations.py index d6780c9..aaa6937 100644 --- a/scripts/configurations.py +++ b/scripts/configurations.py @@ -119,11 +119,9 @@ def __calchash__(file): for c in csort: try: if con[c]: - cstr += '+' - else: - cstr += '-' + cstr += c except ValueError: - cstr += '0' + pass # Add missing csortfile = open(sf(conf.hashconfigsort), 'a'); @@ -135,9 +133,7 @@ def __calchash__(file): csort.append(key) csortfile.write(key + '\n') if val: - cstr += '+' - else: - cstr += '-' + cstr += key csortfile.close() hsh = hashlib.md5(bytes(cstr, 'UTF-8')) -- cgit v1.2.3