diff options
| author | Sworddragon <sworddragon2@aol.com> | 2011-01-06 00:51:31 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-01-06 12:27:50 +0100 |
| commit | 4ff61fcdaa84e874c862374976bf06bb1f367b7f (patch) | |
| tree | 1698ad6869f97a8e6f7f12d4bb4fd6688f7d5eb6 /scripts | |
| parent | b90a015daff77074d9749585903c4d263cbadb88 (diff) | |
| download | zcatch-4ff61fcdaa84e874c862374976bf06bb1f367b7f.tar.gz zcatch-4ff61fcdaa84e874c862374976bf06bb1f367b7f.zip | |
Made compiling process Python 3 compatible
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmd5.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/cmd5.py b/scripts/cmd5.py index df8f8d7a..8402a2bf 100644 --- a/scripts/cmd5.py +++ b/scripts/cmd5.py @@ -26,12 +26,11 @@ def cstrip(lines): f = "" for filename in sys.argv[1:]: - f += cstrip([l.strip() for l in file(filename)]) + f += cstrip([l.decode("iso8859-1").strip() for l in open(filename, "rb")]) - -hash = hashlib.md5(f).hexdigest().lower()[16:] +hash = hashlib.md5(f.encode()).hexdigest().lower()[16:] # TODO: refactor hash that is equal to the 0.5 hash, remove when we # TODO: remove when we don't need it any more if hash == "026b8eceb4cdd369": hash = "b67d1f1a1eea234e" -print '#define GAME_NETVERSION_HASH "%s"' % hash +print('#define GAME_NETVERSION_HASH "%s"' % hash) |