deprecation warning only one time

This commit is contained in:
Junzi Sun 2019-09-11 16:01:55 +02:00
parent 0c1a3b06e1
commit a683e40c41
2 changed files with 4 additions and 6 deletions

View File

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

View 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,