diff pytouhou/formats/pbg3.py @ 97:ac2e5e1c2c3c

Refactor \o/
author Thibaut Girka <thib@sitedethib.com>
date Sun, 04 Sep 2011 23:50:00 +0200
parents 3da4de9decd0
children 88361534c77e
line wrap: on
line diff
--- a/pytouhou/formats/pbg3.py
+++ b/pytouhou/formats/pbg3.py
@@ -43,6 +43,14 @@ class PBG3(object):
         self.bitstream = bitstream #TODO
 
 
+    def __enter__(self):
+        return self
+
+
+    def __exit__(self, type, value, traceback):
+        return self.bitstream.__exit__(type, value, traceback)
+
+
     @classmethod
     def read(cls, file):
         magic = file.read(4)