From: Artem Bityutskiy Date: Tue, 28 Jan 2014 11:15:09 +0000 (+0200) Subject: TransRead: remove useless check X-Git-Tag: v3.2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a8b3d06bfbab6d78eb624ba3e2d03b39ab90706;p=tools%2Fbmap-tools.git TransRead: remove useless check The _CompressedFile class is designed to work with compressed files, and it makes no sense to use it for uncompress files. So let's assume that the decompression function is always present and remove the useless "if self._decompress_func" check. Change-Id: Ie427f1507801525f29efd103dfd4cfdf76291b7e Signed-off-by: Artem Bityutskiy --- diff --git a/bmaptools/TransRead.py b/bmaptools/TransRead.py index c620e50..a2730e2 100644 --- a/bmaptools/TransRead.py +++ b/bmaptools/TransRead.py @@ -164,10 +164,9 @@ class _CompressedFile(object): self._eof = True break - if self._decompress_func: - buf = self._decompress_func(buf) - if not buf: - continue + buf = self._decompress_func(buf) + if not buf: + continue assert len(self._buffer) == 0 assert self._buffer_pos == 0