From 8661f934abf276d71b5bf17b617f425a4fc6f06e Mon Sep 17 00:00:00 2001 From: John Ehresman Date: Tue, 13 Apr 2010 11:49:18 -0400 Subject: Modify codegen code to run under either Python 2.x or 3.x --- codegen/docextract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/docextract.py b/codegen/docextract.py index eff8c5e..06a08a3 100644 --- a/codegen/docextract.py +++ b/codegen/docextract.py @@ -422,10 +422,10 @@ def parse_tmpl(fp, doc_dict): cur_doc = None # don't worry about unused params. elif cur_doc: if line[:10] == '@Returns: ': - if string.strip(line[10:]): + if line[10:].strip(): cur_doc.append_to_return(line[10:]) elif line[0] == '@': - pos = string.find(line, ':') + pos = line.find(':') if pos >= 0: cur_doc.append_to_named_param(line[1:pos], line[pos+1:]) else: -- cgit