Skip to content

Commit 6e1fac7

Browse files
authored
Fix client control on unclaimed servers (#456)
1 parent e914456 commit 6e1fac7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plexapi/server.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ def agents(self, mediaType=None):
193193

194194
def createToken(self, type='delegation', scope='all'):
195195
"""Create a temp access token for the server."""
196+
if not self._token:
197+
# Handle unclaimed servers
198+
return None
196199
q = self.query('/security/token?type=%s&scope=%s' % (type, scope))
197200
return q.attrib.get('token')
198201

0 commit comments

Comments
 (0)