Changeset 3650
- Timestamp:
- 26/10/08 19:18:43 (2 months ago)
- Files:
-
- 1 modified
-
trunk/metadata/src/factory.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/metadata/src/factory.py
r3642 r3650 87 87 raise core.ParseError 88 88 89 class File(file): 90 91 def read(self, bytes=0): 92 if bytes <= 0 or bytes > 1000000: 93 # reading more than 1MB looks like a bug 94 raise IOError('trying to read %s bytes' % bytes) 95 return super(File, self).read(bytes) 89 96 90 97 class _Factory: … … 266 273 if os.path.isfile(filename): 267 274 try: 268 f = open(filename,'rb')275 f = File(filename,'rb') 269 276 except (IOError, OSError), e: 270 277 log.info('error reading %s: %s' % (filename, e))
