diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-11-30 19:56:00 -0600 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-11-30 19:56:00 -0600 |
commit | eda551e8f242695d49a24d797b186f767cdb11aa (patch) | |
tree | 16f4ab355657a4cc5f5ed5821dfca27e7ca14b63 | |
parent | 58bcb08742fae6171e750e4030d80ef61f0101b3 (diff) | |
download | koopatlas-eda551e8f242695d49a24d797b186f767cdb11aa.tar.gz koopatlas-eda551e8f242695d49a24d797b186f767cdb11aa.zip |
typo2
-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']) |