added deprecation waring

This commit is contained in:
Junzi Sun
2018-03-27 18:24:22 +02:00
parent 12506e7c7f
commit 773efff9bc
3 changed files with 17 additions and 1 deletions
+14
View File
@@ -5,3 +5,17 @@ from pyModeS.decoder.bds.bds44 import *
from pyModeS.decoder.bds.bds50 import *
from pyModeS.decoder.bds.bds53 import *
from pyModeS.decoder.bds.bds60 import *
def BDS(msg):
import warnings
from pyModeS.decoder.bds import infer
warnings.simplefilter('always', DeprecationWarning)
warnings.warn("pms.ehs.BDS() is deprecated, use pms.bds.infer() instead", DeprecationWarning)
return infer(msg)
def icao(msg):
import warnings
from pyModeS.decoder.modes import icao
warnings.simplefilter('always', DeprecationWarning)
warnings.warn("pms.ehs.icao() deprecated, please use pms.modes.icao() instead", DeprecationWarning)
return icao(msg)