From e0b9263e5bdfbcd02b39c30734db3fb0df4a9126 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Thu, 12 Jul 2001 04:50:15 +0000 Subject: Skip the legalese paragraph, and be a little more robust about input. --- admin/bin/mm2do | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'admin') diff --git a/admin/bin/mm2do b/admin/bin/mm2do index 10889d36f..16801cc04 100755 --- a/admin/bin/mm2do +++ b/admin/bin/mm2do @@ -1,6 +1,6 @@ #! /usr/bin/env python # -# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc. +# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -42,16 +42,23 @@ def dumpsection(header, items, hasitems): else: for item in items: print >> outfp, SPACE.join(item), '
' - del items[:] + items = [['']] header = '' items = [['']] hasitems = 0 +inpreamble = 1 while 1: line = infp.readline() if not line or line[0] == '\f': break + # Skip the legalese preamble + if inpreamble: + if line.strip(): + continue + else: + inpreamble = 0 if not line[0].isspace(): dumpsection(header, items, hasitems) header = line @@ -62,6 +69,8 @@ while 1: items.append([line[2:-1]]) hasitems += 1 else: - items[-1].append(line[:-1]) + if not line: + continue + items[-1].append(line) dumpsection(header, items, hasitems) -- cgit v1.3.1