diff options
author | Karel Kočí <cynerd@email.cz> | 2015-08-13 09:59:33 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-08-13 10:02:28 +0200 |
commit | 84b4681184165888f26e8988a705764baad18e64 (patch) | |
tree | 853782233dbc6990111362edd9d9d9dbb3380c37 /scripts | |
parent | e1ccb36e492f80c9c6b713697241fa45e77e05e9 (diff) | |
download | linux-conf-perf-84b4681184165888f26e8988a705764baad18e64.tar.gz linux-conf-perf-84b4681184165888f26e8988a705764baad18e64.tar.bz2 linux-conf-perf-84b4681184165888f26e8988a705764baad18e64.zip |
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/configurations.py | 10 |
1 files changed, 3 insertions, 7 deletions
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')) |