From ac5e396f1fb685a09e6f4e72b7fb5276a1344847 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Fri, 20 Jan 2017 09:41:04 +0100 Subject: Follow-up on b87441f6f36c --- cffi/verifier.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cffi/verifier.py') diff --git a/cffi/verifier.py b/cffi/verifier.py index 278a73e..22eb6dc 100644 --- a/cffi/verifier.py +++ b/cffi/verifier.py @@ -4,6 +4,7 @@ import sys, os, binascii, shutil, io from . import __version_verifier_modules__ from . import ffiplatform +from .error import VerificationError if sys.version_info >= (3, 3): import importlib.machinery @@ -42,7 +43,7 @@ class Verifier(object): ext_package=None, tag='', force_generic_engine=False, source_extension='.c', flags=None, relative_to=None, **kwds): if ffi._parser._uses_new_feature: - raise ffiplatform.VerificationError( + raise VerificationError( "feature not supported with ffi.verify(), but only " "with ffi.set_source(): %s" % (ffi._parser._uses_new_feature,)) self.ffi = ffi @@ -83,7 +84,7 @@ class Verifier(object): which can be tweaked beforehand.""" with self.ffi._lock: if self._has_source and file is None: - raise ffiplatform.VerificationError( + raise VerificationError( "source code already written") self._write_source(file) @@ -92,7 +93,7 @@ class Verifier(object): This produces a dynamic link library in 'self.modulefilename'.""" with self.ffi._lock: if self._has_module: - raise ffiplatform.VerificationError("module already compiled") + raise VerificationError("module already compiled") if not self._has_source: self._write_source() self._compile_module() -- cgit v1.2.1