@@ -177,13 +177,13 @@ async def enable_host(self, host_id: str, host_type: str) -> None:
177177 response = await self .api_wrapper ("post" , url , headers = self ._headers )
178178
179179 if response is True :
180- if host_type is "proxy-hosts" :
180+ if host_type == "proxy-hosts" :
181181 self .proxy_hosts_data [host_id ]["enabled" ] = 1
182- if host_type is "redirection-hosts" :
182+ if host_type == "redirection-hosts" :
183183 self .redir_hosts_data [host_id ]["enabled" ] = 1
184- if host_type is "streams" :
184+ if host_type == "streams" :
185185 self .stream_hosts_data [host_id ]["enabled" ] = 1
186- if host_type is "dead-hosts" :
186+ if host_type == "dead-hosts" :
187187 self .dead_hosts_data [host_id ]["enabled" ] = 1
188188 elif "error" in response .keys ():
189189 _LOGGER .error (
@@ -200,13 +200,13 @@ async def disable_host(self, host_id: str, host_type: str) -> None:
200200
201201 response = await self .api_wrapper ("post" , url , headers = self ._headers )
202202 if response is True :
203- if host_type is "proxy-hosts" :
203+ if host_type == "proxy-hosts" :
204204 self .proxy_hosts_data [host_id ]["enabled" ] = 0
205- if host_type is "redirection-hosts" :
205+ if host_type == "redirection-hosts" :
206206 self .redir_hosts_data [host_id ]["enabled" ] = 0
207- if host_type is "streams" :
207+ if host_type == "streams" :
208208 self .stream_hosts_data [host_id ]["enabled" ] = 0
209- if host_type is "dead-hosts" :
209+ if host_type == "dead-hosts" :
210210 self .dead_hosts_data [host_id ]["enabled" ] = 0
211211 elif "error" in response .keys ():
212212 _LOGGER .error (
0 commit comments