mirror of https://github.com/KLayout/klayout.git
Restored ability to build on Python 2
This commit is contained in:
parent
16cd4276b7
commit
ca32b34dff
|
|
@ -663,7 +663,12 @@ method_adaptor (int mid, PyObject *self, PyObject *args)
|
|||
|
||||
// method is not implemented
|
||||
if (! meth) {
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyErr_SetNone(PyExc_NotImplementedError);
|
||||
return NULL;
|
||||
#else
|
||||
Py_RETURN_NOTIMPLEMENTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
// handle special methods
|
||||
|
|
|
|||
|
|
@ -3077,6 +3077,11 @@ class BasicTest(unittest.TestCase):
|
|||
# fallback to __rmul__ for not implemented __mul__
|
||||
|
||||
def test_90(self):
|
||||
|
||||
# skip this test for Python 2
|
||||
if sys.version_info < (3, 0):
|
||||
return
|
||||
|
||||
class RMulObject:
|
||||
def __init__(self, factor):
|
||||
self.factor = factor
|
||||
|
|
|
|||
Loading…
Reference in New Issue