Opened 5 years ago
Closed 5 years ago
Last modified 5 years ago
#13565 closed Patch - Bug Fix (fixed)
Fix recorded markup handling in python3 bindings
Reported by: | rcrdnalor | Owned by: | Bill Meek |
---|---|---|---|
Priority: | minor | Milestone: | 31.0 |
Component: | Bindings - Python | Version: | Master Head |
Severity: | medium | Keywords: | python3 |
Cc: | Ticket locked: | no |
Description
With python3, the following methods of the Python Bindings return now a generator, in opposite to python2, where they return a list:
Recorded.markup.getskiplist() Recorded.markup.getunskiplist() Recorded.markup.getcutlist() Recorded.markup.getuncutlist()
This will break almost all home-made transcoding scripts, once called with python3. Found during debugging of #13562.
Luckily, this is easy to fix, patch attached. It works for python2 and python3 as well.
Without the patch:
$ python3 Python 3.6.9 (default, Nov 7 2019, 10:44:02) >>> from MythTV import MythDB, Recorded >>> db = MythDB() >>> rec = Recorded((3002,20200120201100), db = db) >>> rec.markup.getcutlist() <zip object at 0x7f63ee572d88> <--- this is the generator >>> list(rec.markup.getcutlist()) [(0, 13204), (159325, 9999999)] >>>
With patch:
$ python3 Python 3.6.9 (default, Nov 7 2019, 10:44:02) >>> from MythTV import MythDB, Recorded >>> db = MythDB() >>> rec = Recorded((3002,20200120201100), db = db) >>> rec.markup.getcutlist() [(0, 13204), (159325, 9999999)] >>>
Attachments (1)
Change History (4)
Changed 5 years ago by
Attachment: | Fix_recorded_markup_handling_in_python3_bindings.patch added |
---|
comment:1 Changed 5 years ago by
Milestone: | needs_triage → 31.0 |
---|---|
Status: | new → accepted |
Note: See
TracTickets for help on using
tickets.
Patcg to fix recorded markup handling in python3 bindings