This commit is contained in:
Thomas Nagy 2017-04-17 12:24:33 +02:00
parent c967d29e48
commit 43c7891fe5
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
8 changed files with 14 additions and 12 deletions

View File

@ -95,8 +95,8 @@ class store_context(type):
Context classes must provide an attribute 'cmd' representing the command name, and a function
attribute 'fun' representing the function name that the command uses.
"""
def __init__(cls, name, bases, dict):
super(store_context, cls).__init__(name, bases, dict)
def __init__(cls, name, bases, dct):
super(store_context, cls).__init__(name, bases, dct)
name = cls.__name__
if name in ('ctx', 'Context'):

View File

@ -17,6 +17,7 @@ class WafError(Exception):
:param ex: exception causing this error (optional)
:type ex: exception
"""
Exception.__init__(self)
self.msg = msg
assert not isinstance(msg, Exception)

View File

@ -85,8 +85,7 @@ def configure(conf):
v.MSVC_COMPILER = compiler
try:
v.MSVC_VERSION = float(version)
except Exception:
raise
except TypeError:
v.MSVC_VERSION = float(version[:-3])
conf.find_ifort_win32()

View File

@ -54,14 +54,16 @@ def bibunitscan(self):
for match in re_bibunit.finditer(code):
path = match.group('file')
if path:
found = None
for k in ('', '.bib'):
# add another loop for the tex include paths?
Logs.debug('tex: trying %s%s', path, k)
fi = node.parent.find_resource(path + k)
if fi:
found = True
nodes.append(fi)
# no break, people are crazy
else:
# no break
if not found:
Logs.debug('tex: could not find %s', path)
Logs.debug('tex: found the following bibunit files: %s', nodes)

View File

@ -35,7 +35,7 @@ def get_data(blob_out):
pbData = blob_out.pbData
buffer = c_buffer(cbData)
memcpy(buffer, pbData, cbData)
LocalFree(pbData);
LocalFree(pbData)
return buffer.raw
@conf

View File

@ -214,12 +214,9 @@ def can_retrieve_cache(self):
p = node.abspath()
recv_file(conn, ssig, cnt, p)
cnt += 1
else:
Logs.debug('netcache: obtained %r from cache', self.outputs)
except MissingFile as e:
Logs.debug('netcache: file is not in the cache %r', e)
err = True
except Exception as e:
Logs.debug('netcache: could not get the files %r', self.outputs)
if Logs.verbose > 1:
@ -229,6 +226,9 @@ def can_retrieve_cache(self):
# broken connection? remove this one
close_connection(conn)
conn = None
else:
Logs.debug('netcache: obtained %r from cache', self.outputs)
finally:
release_connection(conn)
if err:

View File

@ -1,5 +1,5 @@
#! /usr/bin/env python
#
# encoding: utf-8
import os
from waflib import Task

View File

@ -150,7 +150,7 @@ its value. However, attributes starting with an underscore _ are ignored
during that process and allows you to store arbitray values that are not supposed
to be written out.
"""
class XCodeNode:
class XCodeNode(object):
def __init__(self):
self._id = newid()
self._been_written = False