import glob
import re
-quiet=True
-warnings=0
-debug=False
-debugsym=None
+quiet = True
+warnings = 0
+debug = False
+debugsym = None
#
# C parser analysis code
def uniq(items):
d = {}
for item in items:
- d[item]=1
+ d[item] = 1
k = sorted(d.keys())
return k
value = "%d" % (int(value) + 1)
except:
self.warning("Failed to compute value of enum %s" % (name))
- value=""
+ value = ""
if token[0] == "sep" and token[1] == ",":
if commentsBeforeVal:
self.cleanupComment()
if apstr != "":
apstr = apstr + " && "
apstr = apstr + cond
- output.write(" <cond>%s</cond>\n"% (apstr))
+ output.write(" <cond>%s</cond>\n" % (apstr))
try:
(ret, params, desc) = id.info
output.write(" <info><![CDATA[%s]]></info>\n" % (desc))
output.write(" </letter>\n")
output.write(" </chunk>\n")
count = 0
- chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
+ chunks.append(["chunk%s" % (chunk - 1), first_letter, letter])
output.write(" <chunk name='chunk%s'>\n" % (chunk))
first_letter = id[0]
chunk = chunk + 1
output.write(" </letter>\n")
output.write(" </chunk>\n")
if count != 0:
- chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
+ chunks.append(["chunk%s" % (chunk - 1), first_letter, letter])
output.write(" <chunks>\n")
for ch in chunks:
output.write(" <chunk name='%s' start='%s' end='%s'/>\n" % (
# The dictionary of tables required and the SQL command needed
# to create them
#
-TABLES={
+TABLES = {
"symbols": """CREATE TABLE symbols (
name varchar(255) BINARY NOT NULL,
module varchar(255) BINARY NOT NULL,
#
# The XML API description file to parse
#
-API="libvirt-api.xml"
-DB=None
+API = "libvirt-api.xml"
+DB = None
#########################################################################
# #
line = (" <cpuid eax_in='0x%08x' ecx_in='0x%02x' "
"eax='0x%08x' ebx='0x%08x' "
"ecx='0x%08x' edx='0x%08x'/>\n")
- f.write(line %(
+ f.write(line % (
in_eax, in_ecx,
leaf["eax"], leaf["ebx"], leaf["ecx"], leaf["edx"]))
f.write("</cpudata>\n")