Fix ElementTree DeprecationWarning when testing truth value (3.12) (#1209)

* Fix ElementTree DeprecationWarning when testing truth value (3.12)

* Use is None check

* Update more locations
This commit is contained in:
Marc Mueller 2023-08-27 22:09:27 +02:00 committed by GitHub
parent b98b6050fe
commit ea4885acf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -94,7 +94,7 @@ class PlexClient(PlexObject):
raise Unsupported('Cannot reload an object not built from a URL.')
self._initpath = self.key
data = self.query(self.key, timeout=timeout)
if not data:
if data is None:
raise NotFound(f"Client not found at {self._baseurl}")
if self._clientIdentifier:
client = next(

View file

@ -1790,7 +1790,7 @@ class MyPlexPinLogin:
params = None
response = self._query(url, self._session.post, params=params)
if not response:
if response is None:
return None
self._id = response.attrib.get('id')
@ -1807,7 +1807,7 @@ class MyPlexPinLogin:
url = self.CHECKPINS.format(pinid=self._id)
response = self._query(url)
if not response:
if response is None:
return False
token = response.attrib.get('authToken')