From bcd947f4bd7cb1cc34a578f7e3af692953c02a19 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Wed, 19 Dec 2012 11:07:52 +0200 Subject: [PATCH] TransRead: code re-arrangement Move class Error a little bit up. Change-Id: Ia5308ff3fbb3f4098bd9ca01d43a814a8c6475cf Signed-off-by: Artem Bityutskiy --- bmaptools/TransRead.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/bmaptools/TransRead.py b/bmaptools/TransRead.py index 646ec6a..ba04736 100644 --- a/bmaptools/TransRead.py +++ b/bmaptools/TransRead.py @@ -48,7 +48,6 @@ def _fake_tell(self): return self._pos - def _add_fake_seek(self): """ Add a limitef fake 'seek()' and 'tell()' capability to a file-like object 'self'. """ @@ -61,6 +60,12 @@ def _add_fake_seek(self): self.seek = types.MethodType(_fake_seek_forward, self) self.tell = types.MethodType(_fake_tell, self) +class Error(Exception): + """ A class for exceptions generated by this module. We currently support + only one type of exceptions, and we basically throw human-readable problem + description in case of errors. """ + pass + class _Bzip2Read: """ This class implements transparent reading from a bzip2-compressed file-like object and decompressing the contents on-the-fly. The only reason @@ -148,13 +153,6 @@ class _Bzip2Read: """ Close the file-like object. """ pass - -class Error(Exception): - """ A class for exceptions generated by this module. We currently support - only one type of exceptions, and we basically throw human-readable problem - description in case of errors. """ - pass - class TransRead: """ This class implement the transparent reading functionality. Instances of this class are file-like objects which you can read and seek only -- 2.7.4