mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-17 05:18:26 +00:00
missing attrs should raise attribute errors.
This commit is contained in:
parent
b385b7626b
commit
4ce1b89c13
1 changed files with 3 additions and 2 deletions
|
@ -271,7 +271,7 @@ class PlexPartialObject(PlexObject):
|
|||
|
||||
def __getattribute__(self, attr):
|
||||
# Dragons inside.. :-/
|
||||
value = utils.getattributeOrNone(PlexPartialObject, self, attr)
|
||||
value = super(PlexPartialObject, self).__getattribute__(attr)
|
||||
# Check a few cases where we dont want to reload
|
||||
if attr == 'key' or attr.startswith('_'): return value
|
||||
if value not in (None, []): return value
|
||||
|
@ -283,7 +283,8 @@ class PlexPartialObject(PlexObject):
|
|||
log.warning("Reloading %s for attr '%s'" % (objname, attr))
|
||||
# Reload and return the value
|
||||
self.reload()
|
||||
return utils.getattributeOrNone(PlexPartialObject, self, attr)
|
||||
return super(PlexPartialObject, self).__getattribute__(attr)
|
||||
|
||||
|
||||
def analyze(self):
|
||||
""" Tell Plex Media Server to performs analysis on it this item to gather
|
||||
|
|
Loading…
Add table
Reference in a new issue