aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeebs <seebs@seebs.net>2016-12-12 14:17:32 -0600
committerSeebs <seebs@seebs.net>2016-12-12 14:17:32 -0600
commit88b5823353d3cbf67a8c1111eaa783ff7dd8e058 (patch)
tree3a88d53bfb7bd7bbba13ca475298511bf240907c
parentd6eb2df3fe63b765f35d62332add4d0e4e9c6a39 (diff)
downloadpseudo-88b5823353d3cbf67a8c1111eaa783ff7dd8e058.tar.gz
pseudo-88b5823353d3cbf67a8c1111eaa783ff7dd8e058.tar.bz2
pseudo-88b5823353d3cbf67a8c1111eaa783ff7dd8e058.zip
Python 3 reports:
File "./makewrappers", line 327 return """/* This function is not called if pseudo is configured --enable-force-async */ ^ TabError: inconsistent use of tabs and spaces in indentation Signed-off-by: Gaƫl PORTAY <gael.portay@savoirfairelinux.com> Signed-off-by: seebs <seebs@seebs.net> --- makewrappers | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/makewrappers b/makewrappers index e9191ed..303e2cc 100755 --- a/makewrappers +++ b/makewrappers @@ -324,7 +324,7 @@ class Function: def maybe_async_skip(self): if self.async_skip: - return """/* This function is not called if pseudo is configured --enable-force-async */ + return """/* This function is not called if pseudo is configured --enable-force-async */ #ifdef PSEUDO_FORCE_ASYNC if (!pseudo_allow_fsync) { PROFILE_DONE; @@ -333,7 +333,7 @@ class Function: #endif """ % self.async_skip else: - return "" + return "" def comment(self): """declare self (in a comment)""" @@ -393,11 +393,11 @@ class Function: def rc_format(self): """the format string to use for the return value""" - return typedata.get(self.type, { 'format': '[%s]', 'value': '"' + self.type + '"' })['format'] + return typedata.get(self.type, { 'format': '[%s]', 'value': '"' + self.type + '"' })['format'] def rc_value(self): """the value to pass for the format string for the return value""" - return typedata.get(self.type, { 'format': '[%s]', 'value': '"' + self.type + '"' })['value'] + return typedata.get(self.type, { 'format': '[%s]', 'value': '"' + self.type + '"' })['value'] def rc_decl(self): """declare rc (if needed)""" @@ -456,7 +456,7 @@ additional ports to include. self.name = port self.subports = [] self.preports = [] - print port + print port if os.path.exists(self.portfile("pseudo_wrappers.c")): self.wrappers = self.portfile("pseudo_wrappers.c") @@ -522,11 +522,11 @@ additional ports to include. return '#define PSEUDO_PORT_%s 1' % string.upper(self.name).replace('/', '_') def portdeps(self): - deps = [] - if self.wrappers: - deps.append(self.wrappers) - if self.portdef_file: - deps.append(self.portdef_file) + deps = [] + if self.wrappers: + deps.append(self.wrappers) + if self.portdef_file: + deps.append(self.portdef_file) if deps: return 'pseudo_wrappers.o: %s' % ' '.join(deps) else: @@ -590,7 +590,7 @@ def main(argv): for arg in argv: name, value = arg.split('=') - os.environ["port_" + name] = value + os.environ["port_" + name] = value # error checking helpfully provided by the exception handler copyright_file = open('guts/COPYRIGHT') @@ -599,9 +599,9 @@ def main(argv): for path in glob.glob('templates/*'): try: - print "Considering template: " + path + print "Considering template: " + path source = TemplateFile(path) - if source.name.endswith('.c') or source.name.endswith('.h'): + if source.name.endswith('.c') or source.name.endswith('.h'): source.emit('copyright') source.emit('header') sources.append(source) -- 2.10.1
-rw-r--r--ChangeLog.txt3
-rwxr-xr-xmakewrappers26
2 files changed, 16 insertions, 13 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index e05572c..7db47b2 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2016-12-12:
+ * (seebs) contributed fix to makewrappers (fix space/tab issues)
+
2016-11-23:
* (seebs) actually wait on server shutdown for pseudo -S [cmd]
diff --git a/makewrappers b/makewrappers
index e9191ed..303e2cc 100755
--- a/makewrappers
+++ b/makewrappers
@@ -324,7 +324,7 @@ class Function:
def maybe_async_skip(self):
if self.async_skip:
- return """/* This function is not called if pseudo is configured --enable-force-async */
+ return """/* This function is not called if pseudo is configured --enable-force-async */
#ifdef PSEUDO_FORCE_ASYNC
if (!pseudo_allow_fsync) {
PROFILE_DONE;
@@ -333,7 +333,7 @@ class Function:
#endif
""" % self.async_skip
else:
- return ""
+ return ""
def comment(self):
"""declare self (in a comment)"""
@@ -393,11 +393,11 @@ class Function:
def rc_format(self):
"""the format string to use for the return value"""
- return typedata.get(self.type, { 'format': '[%s]', 'value': '"' + self.type + '"' })['format']
+ return typedata.get(self.type, { 'format': '[%s]', 'value': '"' + self.type + '"' })['format']
def rc_value(self):
"""the value to pass for the format string for the return value"""
- return typedata.get(self.type, { 'format': '[%s]', 'value': '"' + self.type + '"' })['value']
+ return typedata.get(self.type, { 'format': '[%s]', 'value': '"' + self.type + '"' })['value']
def rc_decl(self):
"""declare rc (if needed)"""
@@ -456,7 +456,7 @@ additional ports to include.
self.name = port
self.subports = []
self.preports = []
- print port
+ print port
if os.path.exists(self.portfile("pseudo_wrappers.c")):
self.wrappers = self.portfile("pseudo_wrappers.c")
@@ -522,11 +522,11 @@ additional ports to include.
return '#define PSEUDO_PORT_%s 1' % string.upper(self.name).replace('/', '_')
def portdeps(self):
- deps = []
- if self.wrappers:
- deps.append(self.wrappers)
- if self.portdef_file:
- deps.append(self.portdef_file)
+ deps = []
+ if self.wrappers:
+ deps.append(self.wrappers)
+ if self.portdef_file:
+ deps.append(self.portdef_file)
if deps:
return 'pseudo_wrappers.o: %s' % ' '.join(deps)
else:
@@ -590,7 +590,7 @@ def main(argv):
for arg in argv:
name, value = arg.split('=')
- os.environ["port_" + name] = value
+ os.environ["port_" + name] = value
# error checking helpfully provided by the exception handler
copyright_file = open('guts/COPYRIGHT')
@@ -599,9 +599,9 @@ def main(argv):
for path in glob.glob('templates/*'):
try:
- print "Considering template: " + path
+ print "Considering template: " + path
source = TemplateFile(path)
- if source.name.endswith('.c') or source.name.endswith('.h'):
+ if source.name.endswith('.c') or source.name.endswith('.h'):
source.emit('copyright')
source.emit('header')
sources.append(source)