X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils.py;h=f6b9e15a60dc6e4db66d33cc7060c9256a9572bc;hb=9e5a41ce2cdb81c25dfebf9fdc03558c2baeb503;hp=b019d2ef8d58ac4898e39f067bc8ec0e9149ef6c;hpb=763770541a41d6497105a2c533c93a83095b17ea;p=dak.git diff --git a/utils.py b/utils.py index b019d2ef..f6b9e15a 100644 --- a/utils.py +++ b/utils.py @@ -1,6 +1,6 @@ # Utility functions # Copyright (C) 2000, 2001, 2002 James Troup -# $Id: utils.py,v 1.48 2002-06-22 22:34:35 troup Exp $ +# $Id: utils.py,v 1.49 2002-07-12 15:09:57 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -144,6 +144,7 @@ def parse_changes(filename, dsc_whitespace_rules=0): indices = indexed_lines.keys() index = 0; + first = -1; while index < max(indices): index = index + 1; line = indexed_lines[index]; @@ -177,6 +178,8 @@ def parse_changes(filename, dsc_whitespace_rules=0): continue; mlf = re_multi_line_field.match(line); if mlf: + if first == -1: + raise changes_parse_error_exc, "'%s'\n [Multi-line field continuing on from nothing?]" % (line); if first == 1 and changes[field] != "": changes[field] = changes[field] + '\n'; first = 0;