From eda551e8f242695d49a24d797b186f767cdb11aa Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Wed, 30 Nov 2011 19:56:00 -0600 Subject: typo2 --- src/mapdata.py | 9 +++++---- 1 file 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']) -- cgit v1.2.3