When the description doesn't have a body, the import command generates an
exception.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
if not descr_lines:
raise CmdException, "Empty patch description"
if not descr_lines:
raise CmdException, "Empty patch description"
lasthdr = 0
end = len(descr_lines)
# Parse the patch header
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
if not descr_lines[pos]:
continue
# check for a "From|Author:" line