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:05:51 +0200 | 
| commit | b88557fa9e30b57e616635e3037ea5b56f7d4d4f (patch) | |
| tree | a8ef7ec58879bea587ab4f92ec115a10c12f4746 | |
| parent | 8a3d7b8ed5b559c3777b9ee4715361d2dc01da07 (diff) | |
| download | linux-conf-perf-b88557fa9e30b57e616635e3037ea5b56f7d4d4f.tar.gz linux-conf-perf-b88557fa9e30b57e616635e3037ea5b56f7d4d4f.tar.bz2 linux-conf-perf-b88557fa9e30b57e616635e3037ea5b56f7d4d4f.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.
| -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 3fb22d9..ba326ea 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')) | 
