Package: freefoam Version: 0.1.0-1 Severity: normal Tags: upstream patch Dear Maintainer,
freefoam-log fails to work with a truncated log file where some of the data at the last time-step is cut off (e.g. because the user aborted the program). This is already fixed in upstream: http://repo.or.cz/w/freefoam.git?a=commit;h=12af016309fc4828035e16290bc128955507ed43 -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-27-generic (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C) Shell: /bin/sh linked to /bin/dash Versions of packages freefoam depends on: ii libc6 2.13-34 ii libfreefoam 0.1.0-1 ii libgcc1 1:4.7.1-5 ii libreadline6 6.2-8 ii libstdc++6 4.7.1-5 ii mpi-default-bin 1.0.1 ii python 2.7.3-1 ii tcsh [c-shell] 6.18.01-2 ii zlib1g 1:1.2.7.dfsg-13 freefoam recommends no packages. freefoam suggests no packages. -- no debconf information
>From 12af016309fc4828035e16290bc128955507ed43 Mon Sep 17 00:00:00 2001 From: Michael Wild <them...@users.sourceforge.net> Date: Tue, 13 Mar 2012 17:24:22 +0100 Subject: FIX: Handle truncated logs in freefoam-log Origin: http://repo.or.cz/w/freefoam.git?a=commit;h=12af016309fc4828035e16290bc128955507ed43 Applied-Upstream: 0.1.1 Signed-off-by: Michael Wild <them...@users.sourceforge.net> --- bin/freefoam-log.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/freefoam-log.py.in b/bin/freefoam-log.py.in index 325dcf5..07d18e2 100755 --- a/bin/freefoam-log.py.in +++ b/bin/freefoam-log.py.in @@ -323,7 +323,7 @@ tLen = max(map(len, time)) for n, v in data.items(): for i in xrange(len(v)): f = open(os.path.join(logsDir, '%s_%d'%(n, i)), 'wt') - for j in xrange(len(time)): + for j in range(min(len(time), len(v[i]))): if not noTime: f.write(('%-'+str(tLen)+'s ')%time[j]) f.write('%s\n'%v[i][j]) -- 1.7.9.5