1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00

Deprecation warning

This commit is contained in:
Jan Decaluwe 2016-02-11 13:27:33 +01:00
parent 5c84578076
commit 1d4625838f

View File

@ -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