]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add close() method to VinFile
authorGuido van Rossum <guido@python.org>
Tue, 18 Aug 1992 17:00:51 +0000 (17:00 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 18 Aug 1992 17:00:51 +0000 (17:00 +0000)
Demo/sgi/video/VFile.py

index 9415e2c0372a068548890049f01a7c1a25e3a11b..2febd5a275216bdb30492110176e97d2e063feb3 100755 (executable)
@@ -155,6 +155,10 @@ class VinFile:
                if not self.hascache:
                        raise Error, 'Cannot warm cache'
 
+       def close(self):
+               self.fp.close()
+               self.fp = None
+
 
        #
        # getinfo returns all info pertaining to a film. The returned tuple
@@ -421,7 +425,7 @@ class VoutFile:
 
        def close(self):
                self.fp.close()
-               self = self.initfp(None, None)
+               x = self.initfp(None, None)
 
        def setinfo(self, values):
                self.format, self.width, self.height, self.packfactor,\