From 4c8fef144ee39f96206111007797e32ee8b5d379 Mon Sep 17 00:00:00 2001 From: Jason Lawrence Date: Mon, 29 Jun 2020 17:31:05 -0500 Subject: [PATCH] Fix ElementTree warnings --- plexapi/client.py | 2 +- plexapi/myplex.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plexapi/client.py b/plexapi/client.py index 34b9ac48..9e720d62 100644 --- a/plexapi/client.py +++ b/plexapi/client.py @@ -69,7 +69,7 @@ class PlexClient(PlexObject): self._proxyThroughServer = False self._commandId = 0 self._last_call = 0 - if not any([data, initpath, baseurl, token]): + if not any([data is not None, initpath, baseurl, token]): self._baseurl = CONFIG.get('auth.client_baseurl', 'http://localhost:32433') self._token = logfilter.add_secret(CONFIG.get('auth.client_token')) if connect and self._baseurl: diff --git a/plexapi/myplex.py b/plexapi/myplex.py index 5585c885..8806fdb5 100644 --- a/plexapi/myplex.py +++ b/plexapi/myplex.py @@ -139,7 +139,7 @@ class MyPlexAccount(PlexObject): roles = data.find('roles') self.roles = [] - if roles: + if roles is not None: for role in roles.iter('role'): self.roles.append(role.attrib.get('id'))