summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2014-11-18 14:45:37 +0000
committerKim van der Riet <kpvdr@apache.org>2014-11-18 14:45:37 +0000
commitaf6e1702054ae0306e1a05caa88a320066f341b9 (patch)
treef646b0bc6f5fb3e24b9f45bde24c7412c9de43f1 /tools
parent471859cbc7e07a9f97dd490b0839beac3d9e4d83 (diff)
downloadqpid-python-af6e1702054ae0306e1a05caa88a320066f341b9.tar.gz
QPID-6230 [linearstore] qpid-qls-analyze fails when analyzing empty journal
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1640353 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools')
-rw-r--r--tools/src/py/qlslibs/anal.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/src/py/qlslibs/anal.py b/tools/src/py/qlslibs/anal.py
index 502d860bfa..df51c1b2b4 100644
--- a/tools/src/py/qlslibs/anal.py
+++ b/tools/src/py/qlslibs/anal.py
@@ -420,6 +420,8 @@ class Journal(object):
self.file_num_list = sorted(self.files.keys())
self.file_num_itr = iter(self.file_num_list)
def _check_alignment(self): # TODO: Move into JournalFile
+ if self.last_record_offset is None: # Empty file, _check_file() never run
+ return
remaining_sblks = self.last_record_offset % qlslibs.utils.DEFAULT_SBLK_SIZE
if remaining_sblks == 0:
self.num_filler_records_required = 0