Mercurial > touhou
diff pytouhou/game/eclrunner.py @ 58:3da4de9decd0
Use logging module
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 23 Aug 2011 21:01:50 +0200 |
parents | 694f25881d0f |
children | 4fe37a620b22 |
line wrap: on
line diff
--- a/pytouhou/game/eclrunner.py +++ b/pytouhou/game/eclrunner.py @@ -15,6 +15,11 @@ from math import atan2, cos, sin +from pytouhou.utils.helpers import get_logger + +logger = get_logger(__name__) + + class MetaRegistry(type): def __new__(mcs, name, bases, classdict): @@ -96,7 +101,7 @@ class ECLRunner(object): try: callback = self._handlers[instr_type] except KeyError: - print('Warning: unhandled opcode %d!' % instr_type) #TODO + logger.warn('unhandled opcode %d (args: %r)', instr_type, args) else: callback(self, *args)