mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 14:14:19 +00:00
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:
parent
b98b6050fe
commit
ea4885acf7
2 changed files with 3 additions and 3 deletions
|
@ -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(
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue