diff options
author | Frechdachs <Frechdachs@users.noreply.github.com> | 2016-02-12 12:40:19 +0100 |
---|---|---|
committer | jaseg <code@jaseg.net> | 2016-02-12 14:09:21 +0100 |
commit | bcd81668291931c344dd8d605ef74048c96d42a7 (patch) | |
tree | fd56519f77306939557ee7e2abef560f693f441d /README.md | |
parent | ee8316a282d0fed860a98b0edb481739f801c6c6 (diff) | |
download | python-mpv-bcd81668291931c344dd8d605ef74048c96d42a7.tar.gz python-mpv-bcd81668291931c344dd8d605ef74048c96d42a7.tar.bz2 python-mpv-bcd81668291931c344dd8d605ef74048c96d42a7.zip |
Fix property getter for non-available properties
Properties which are not currently available weren't handled properly: The getter for a property that is not available with proptype 'str' would return "None" (as a string) instead of None. Trying to retrieve a non-available property with proptype 'int' would raise a TypeError, because the getter tries to call 'int(None)'. An alternative would be to raise some kind of exception for non-available properties, but I would prefer the getter to return None. For example None should be a valid value for the property 'path' if no video is loaded yet.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions