deprecation warning only one time
This commit is contained in:
parent
0c1a3b06e1
commit
a683e40c41
@ -1,5 +1,8 @@
|
|||||||
from __future__ import absolute_import, print_function, division
|
from __future__ import absolute_import, print_function, division
|
||||||
|
|
||||||
|
import os
|
||||||
|
import warnings
|
||||||
|
|
||||||
from .decoder.common import *
|
from .decoder.common import *
|
||||||
from .decoder import tell
|
from .decoder import tell
|
||||||
from .decoder import adsb
|
from .decoder import adsb
|
||||||
@ -9,9 +12,6 @@ from .decoder import bds
|
|||||||
from .extra import aero
|
from .extra import aero
|
||||||
from .extra import tcpclient
|
from .extra import tcpclient
|
||||||
|
|
||||||
# from .decoder import els # depricated
|
warnings.simplefilter("once", DeprecationWarning)
|
||||||
# from .decoder import ehs # depricated
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
dirpath = os.path.dirname(os.path.realpath(__file__))
|
dirpath = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
@ -121,7 +121,6 @@ def p40baro(msg):
|
|||||||
|
|
||||||
|
|
||||||
def alt40mcp(msg):
|
def alt40mcp(msg):
|
||||||
warnings.simplefilter("once", DeprecationWarning)
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"alt40mcp() has been renamed to selalt40mcp(). It will be removed in the future.",
|
"alt40mcp() has been renamed to selalt40mcp(). It will be removed in the future.",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
@ -130,7 +129,6 @@ def alt40mcp(msg):
|
|||||||
|
|
||||||
|
|
||||||
def alt40fms(msg):
|
def alt40fms(msg):
|
||||||
warnings.simplefilter("once", DeprecationWarning)
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"alt40fms() has been renamed to selalt40fms(). It will be removed in the future.",
|
"alt40fms() has been renamed to selalt40fms(). It will be removed in the future.",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
|
Loading…
Reference in New Issue
Block a user