Opened 18 years ago
Closed 18 years ago
#2566 closed defect (fixed)
Mythburn.py chanid and starttime mixed-up when file details changed in job-file
Reported by: | Owned by: | paulh | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mytharchive | Version: | 0.20 |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Line 800 of mythburn.py:
recdate=time.strptime( "%s" % record[1],"%Y-%m-%d %H:%M:%S")
throws ValueError (when file details changed in MythArchive):
Traceback (most recent call last): File "mythburn.py", line 3493, in ? processJob(job) File "mythburn.py", line 3257, in processJob preProcessFile(node,folder) File "mythburn.py", line 1132, in preProcessFile getFileInformation(file, os.path.join(folder, "info.xml")) File "mythburn.py", line 842, in getFileInformation recdate=time.strptime( "%s" % record[1],"%Y-%m-%d %H:%M:%S") File "/usr/lib/python2.4/_strptime.py", line 293, in strptime raise ValueError("time data did not match format: data=%s fmt=%s" % ValueError: time data did not match format: data=1511 fmt=%Y-%m-%d %H:%M:%S
It seems that chanid and starttime have been mixed up, record[0] should contain the starttime, and record[1] contains chanid.
If so, in line 795
node = infoDOM.createElement("chanid") node.appendChild(infoDOM.createTextNode("%s" % record[0]))
record[0] is probably also incorrect.
in line 806 record is used correctly:
starttime = record[0] chanid = record[1]
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [11565]) Fixes a mixup when retrieving the chanid and starttime from the DB. Refs #2566