summaryrefslogtreecommitdiff
path: root/generator.py
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2013-12-03 12:08:22 +0000
committerDaniel P. Berrange <berrange@redhat.com>2013-12-09 13:50:42 +0000
commitdec4ff10ff8a2473fa871b03025b82311af384e0 (patch)
tree04b034be86d67ec32c797cd524a0af98081ff43e /generator.py
parent394d88324c2259265824a5cc86e815b062b61c4b (diff)
downloadlibvirt-python-dec4ff10ff8a2473fa871b03025b82311af384e0.tar.gz
generator: Remove use of string.replace and string.find functions
Call the 'replace' and 'find' functions directly on the string variables, instead of via the 'string' module. Python3 only accepts the latter syntax Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'generator.py')
-rwxr-xr-xgenerator.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/generator.py b/generator.py
index 7ee782a..2cb3a82 100755
--- a/generator.py
+++ b/generator.py
@@ -1188,15 +1188,15 @@ def writeDoc(module, name, args, indent, output):
if funcs[name][0] is None or funcs[name][0] == "":
return
val = funcs[name][0]
- val = string.replace(val, "NULL", "None")
+ val = val.replace("NULL", "None")
output.write(indent)
output.write('"""')
- i = string.find(val, "\n")
+ i = val.find("\n")
while i >= 0:
str = val[0:i+1]
val = val[i+1:]
output.write(str)
- i = string.find(val, "\n")
+ i = val.find("\n")
output.write(indent)
output.write(val)
output.write(' """\n')