From 61dabd0e4d6a7ef2377813872235565924398e4f Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Tue, 20 Dec 2005 13:20:36 +0000 Subject: [PATCH 1/1] Fix the import command when the body is empty When the description doesn't have a body, the import command generates an exception. Signed-off-by: Catalin Marinas --- stgit/commands/imprt.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py index fdb91ea..6ccdcc9 100644 --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -78,13 +78,11 @@ def __parse_description(descr): if not descr_lines: raise CmdException, "Empty patch description" - pos = -1 lasthdr = 0 end = len(descr_lines) # Parse the patch header - while pos < end: - pos += 1 + for pos in range(0, end): if not descr_lines[pos]: continue # check for a "From|Author:" line -- 2.11.0