Skip to content

Commit 681a0df

Browse files
authored
Add runtime warnings for deprecated classes
Added runtime warning for deprecated User and HomeData classes.
1 parent cdb818a commit 681a0df

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lnetatmo.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ class User:
299299
"""
300300
warnings.warn("The 'User' class is no longer maintained by Netatmo",
301301
DeprecationWarning )
302+
warnings.warn("The 'User' class code is deprecated.\n" ,
303+
RuntimeWarning )
302304
def __init__(self, authData):
303305
postParams = {
304306
"access_token" : authData.accessToken
@@ -670,6 +672,9 @@ class HomeData:
670672
def __init__(self, authData, home=None):
671673
warnings.warn("The 'HomeData' class is deprecated'",
672674
DeprecationWarning )
675+
warnings.warn("The HomeData code is deprecated.\n" ,
676+
RuntimeWarning )
677+
673678
self.getAuthToken = authData.accessToken
674679
postParams = {
675680
"access_token" : self.getAuthToken

0 commit comments

Comments
 (0)