mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
python: Add whitespace around = and % operators
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
This commit is contained in:
parent
28593b5b54
commit
293bb82b58
@ -15,10 +15,10 @@ import sys
|
|||||||
import glob
|
import glob
|
||||||
import re
|
import re
|
||||||
|
|
||||||
quiet=True
|
quiet = True
|
||||||
warnings=0
|
warnings = 0
|
||||||
debug=False
|
debug = False
|
||||||
debugsym=None
|
debugsym = None
|
||||||
|
|
||||||
#
|
#
|
||||||
# C parser analysis code
|
# C parser analysis code
|
||||||
@ -132,7 +132,7 @@ def escape(raw):
|
|||||||
def uniq(items):
|
def uniq(items):
|
||||||
d = {}
|
d = {}
|
||||||
for item in items:
|
for item in items:
|
||||||
d[item]=1
|
d[item] = 1
|
||||||
k = sorted(d.keys())
|
k = sorted(d.keys())
|
||||||
return k
|
return k
|
||||||
|
|
||||||
@ -1408,7 +1408,7 @@ class CParser:
|
|||||||
value = "%d" % (int(value) + 1)
|
value = "%d" % (int(value) + 1)
|
||||||
except:
|
except:
|
||||||
self.warning("Failed to compute value of enum %s" % (name))
|
self.warning("Failed to compute value of enum %s" % (name))
|
||||||
value=""
|
value = ""
|
||||||
if token[0] == "sep" and token[1] == ",":
|
if token[0] == "sep" and token[1] == ",":
|
||||||
if commentsBeforeVal:
|
if commentsBeforeVal:
|
||||||
self.cleanupComment()
|
self.cleanupComment()
|
||||||
@ -2286,7 +2286,7 @@ class docBuilder:
|
|||||||
if apstr != "":
|
if apstr != "":
|
||||||
apstr = apstr + " && "
|
apstr = apstr + " && "
|
||||||
apstr = apstr + cond
|
apstr = apstr + cond
|
||||||
output.write(" <cond>%s</cond>\n"% (apstr))
|
output.write(" <cond>%s</cond>\n" % (apstr))
|
||||||
try:
|
try:
|
||||||
(ret, params, desc) = id.info
|
(ret, params, desc) = id.info
|
||||||
output.write(" <info><![CDATA[%s]]></info>\n" % (desc))
|
output.write(" <info><![CDATA[%s]]></info>\n" % (desc))
|
||||||
@ -2479,7 +2479,7 @@ class docBuilder:
|
|||||||
output.write(" </letter>\n")
|
output.write(" </letter>\n")
|
||||||
output.write(" </chunk>\n")
|
output.write(" </chunk>\n")
|
||||||
count = 0
|
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))
|
output.write(" <chunk name='chunk%s'>\n" % (chunk))
|
||||||
first_letter = id[0]
|
first_letter = id[0]
|
||||||
chunk = chunk + 1
|
chunk = chunk + 1
|
||||||
@ -2502,7 +2502,7 @@ class docBuilder:
|
|||||||
output.write(" </letter>\n")
|
output.write(" </letter>\n")
|
||||||
output.write(" </chunk>\n")
|
output.write(" </chunk>\n")
|
||||||
if count != 0:
|
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")
|
output.write(" <chunks>\n")
|
||||||
for ch in chunks:
|
for ch in chunks:
|
||||||
output.write(" <chunk name='%s' start='%s' end='%s'/>\n" % (
|
output.write(" <chunk name='%s' start='%s' end='%s'/>\n" % (
|
||||||
|
@ -58,7 +58,7 @@ libxml2.registerErrorHandler(callback, None)
|
|||||||
# The dictionary of tables required and the SQL command needed
|
# The dictionary of tables required and the SQL command needed
|
||||||
# to create them
|
# to create them
|
||||||
#
|
#
|
||||||
TABLES={
|
TABLES = {
|
||||||
"symbols": """CREATE TABLE symbols (
|
"symbols": """CREATE TABLE symbols (
|
||||||
name varchar(255) BINARY NOT NULL,
|
name varchar(255) BINARY NOT NULL,
|
||||||
module varchar(255) BINARY NOT NULL,
|
module varchar(255) BINARY NOT NULL,
|
||||||
@ -116,8 +116,8 @@ TABLES={
|
|||||||
#
|
#
|
||||||
# The XML API description file to parse
|
# The XML API description file to parse
|
||||||
#
|
#
|
||||||
API="libvirt-api.xml"
|
API = "libvirt-api.xml"
|
||||||
DB=None
|
DB = None
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# #
|
# #
|
||||||
|
@ -325,7 +325,7 @@ def formatCpuid(cpuid, path, comment):
|
|||||||
line = (" <cpuid eax_in='0x%08x' ecx_in='0x%02x' "
|
line = (" <cpuid eax_in='0x%08x' ecx_in='0x%02x' "
|
||||||
"eax='0x%08x' ebx='0x%08x' "
|
"eax='0x%08x' ebx='0x%08x' "
|
||||||
"ecx='0x%08x' edx='0x%08x'/>\n")
|
"ecx='0x%08x' edx='0x%08x'/>\n")
|
||||||
f.write(line %(
|
f.write(line % (
|
||||||
in_eax, in_ecx,
|
in_eax, in_ecx,
|
||||||
leaf["eax"], leaf["ebx"], leaf["ecx"], leaf["edx"]))
|
leaf["eax"], leaf["ebx"], leaf["ecx"], leaf["edx"]))
|
||||||
f.write("</cpudata>\n")
|
f.write("</cpudata>\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user