summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ehresman <jpe@wingware.com>2010-04-13 11:49:18 -0400
committerJohn Ehresman <jpe@wingware.com>2010-04-15 12:16:48 -0400
commit8661f934abf276d71b5bf17b617f425a4fc6f06e (patch)
treecae8ec8dcc890efdbc313932d9debf7886b56423
parent7611526f31237ce16d2509b7115d83000aa8b080 (diff)
downloadpygobject-8661f934abf276d71b5bf17b617f425a4fc6f06e.tar.gz
pygobject-8661f934abf276d71b5bf17b617f425a4fc6f06e.tar.xz
pygobject-8661f934abf276d71b5bf17b617f425a4fc6f06e.zip
Modify codegen code to run under either Python 2.x or 3.x
-rw-r--r--codegen/docextract.py4
1 files 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: