From 1d4625838f7be16c7ffbf64ae02d086f5f380024 Mon Sep 17 00:00:00 2001 From: Jan Decaluwe Date: Thu, 11 Feb 2016 13:27:33 +0100 Subject: [PATCH] Deprecation warning --- myhdl/conversion/_verify.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/myhdl/conversion/_verify.py b/myhdl/conversion/_verify.py index ca63fc91..3149136c 100644 --- a/myhdl/conversion/_verify.py +++ b/myhdl/conversion/_verify.py @@ -5,6 +5,7 @@ import os import tempfile import subprocess import difflib +import warnings from collections import namedtuple @@ -116,7 +117,11 @@ class _VerificationClass(object): elif isinstance(func, _ModuleInstance): name = func.mod.__name__ else: - name = func.__name__ + warnings.warn("Deprecated use of analyze()/verify(): use a ModuleInstance argument", stacklevel=2) + try: + name = func.__name__ + except: + raise TypeError(str(type(func))) vals = {} vals['topname'] = name