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