Merge pull request #520 from jjlawren/fix_elementtree_warnings

Fix ElementTree warnings
This commit is contained in:
Steffen Fredriksen 2020-07-24 12:01:02 +02:00 committed by GitHub
commit 65fa780383
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ class PlexClient(PlexObject):
self._proxyThroughServer = False self._proxyThroughServer = False
self._commandId = 0 self._commandId = 0
self._last_call = 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._baseurl = CONFIG.get('auth.client_baseurl', 'http://localhost:32433')
self._token = logfilter.add_secret(CONFIG.get('auth.client_token')) self._token = logfilter.add_secret(CONFIG.get('auth.client_token'))
if connect and self._baseurl: if connect and self._baseurl:

View file

@ -139,7 +139,7 @@ class MyPlexAccount(PlexObject):
roles = data.find('roles') roles = data.find('roles')
self.roles = [] self.roles = []
if roles: if roles is not None:
for role in roles.iter('role'): for role in roles.iter('role'):
self.roles.append(role.attrib.get('id')) self.roles.append(role.attrib.get('id'))