Mercurial > touhou
diff pytouhou/formats/pbg3.py @ 58:3da4de9decd0
Use logging module
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 23 Aug 2011 21:01:50 +0200 |
parents | ab826bc29aa2 |
children | ac2e5e1c2c3c |
line wrap: on
line diff
--- a/pytouhou/formats/pbg3.py +++ b/pytouhou/formats/pbg3.py @@ -1,7 +1,3 @@ -from pytouhou.utils.bitstream import BitStream -import pytouhou.utils.lzss as lzss - - # -*- encoding: utf-8 -*- ## ## Copyright (C) 2011 Thibaut Girka <thib@sitedethib.com> @@ -16,6 +12,14 @@ import pytouhou.utils.lzss as lzss ## GNU General Public License for more details. ## +from pytouhou.utils.bitstream import BitStream +import pytouhou.utils.lzss as lzss + +from pytouhou.utils.helpers import get_logger + +logger = get_logger(__name__) + + class PBG3BitStream(BitStream): def read_int(self): size = self.read(2) @@ -80,6 +84,6 @@ class PBG3(object): value += ord(c) value &= 0xFFFFFFFF if value != checksum: - print('Warning: corrupted data') #TODO + logger.warn('corrupted data!') return data