[mythtv-commits] [MythTV/mythtv] b848ee: Python Bindings: Fix update of class ParseSet

Roland Ernst noreply at github.com
Sun Apr 16 14:55:30 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: b848ee60fe3b2ca5e2b29e2e1af822caab0c574f
      https://github.com/MythTV/mythtv/commit/b848ee60fe3b2ca5e2b29e2e1af822caab0c574f
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2023-04-16 (Sun, 16 Apr 2023)

  Changed paths:
    M mythtv/bindings/python/MythTV/database.py

  Log Message:
  -----------
  Python Bindings: Fix update of class ParseSet

This is a left-over from the python 2to3 conversion.
When updating the 'VideoProp' instance of the RecoredProgram object,
a trace-back occurs:
'  File "..../MythTV/database.py", line 293, in _sanitize
    for key in data.keys():'
'RuntimeError: dictionary changed size during iteration'

With this fix, the following sequence works when retrieving
RecoredProgram entry of a damaged recording via recordedid:
$ python3
>>> from MythTV import MythDB, Recorded, RecordedProgram
>>> db = MythDB()
>>> rec = next(db.searchRecorded(recordedid = 3))
>>> recprgm = RecordedProgram.fromRecorded(rec)
>>> vidprops = recprgm.VideoProp
>>> type(vidprops)
<class 'MythTV.utility.other.ParseSet'>
>>> vidprops
['WIDESCREEN', 'MPEG2', 'DAMAGED']
>>> videoprops['DAMAGED'] = False
>>> recprgm.update()




More information about the mythtv-commits mailing list