diff options
-rw-r--r-- | src/mapdata.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mapdata.py b/src/mapdata.py index b47a1fe..d4bc571 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -372,7 +372,8 @@ class KPMap(object): def loadTilesets(self): - import os, hashlib + import os + from hashlib import sha256 as sha path = os.getcwd() + os.sep + 'Tilesets' @@ -388,21 +389,21 @@ class KPMap(object): filehandler = open(filepath) data = filehandler.read() filehandler.close() - hash = hashlib.sha256(data).hexdigest() + hash = sha(data).hexdigest() self.tilesets[name] = {'path': filepath, 'hash': hash} self.loadedTilesets[name] = KPTileset.loadFromArc(filepath) def reloadTileset(self, name): - from hashlib import + from hashlib import sha256 as sha info = self.tilesets[name] filehandler = open(info['path']) data = filehandler.read() filehandler.close() - hash = hashlib.sha256(data).hexdigest() + hash = sha(data).hexdigest() if info['hash'] != hash: self.loadedTilesets[name] = KPTileset.loadFromArc(info['path']) |